Re: cg14 vesa (modes) project on github

Andrew Randrianasulu <[email protected]> Thu, 8 Jan 2026 06:47:23 +0300
Newsgroups gmane.os.netbsd.ports.sparc
Message-ID <CA+rFky6k7k3D5gyvBOjt7v+OJ_v4HdCBCrVV82o_okYGk2LxVQ@mail.gmail.com>
чт, 8 янв. 2026 г., 06:16 Bob Breuer <[email protected]>:

> On Wed, Jan 7, 2026 at 11:46 AM Andrew Randrianasulu
> <[email protected]> wrote:
> >
> > On Wed, Jan 7, 2026 at 8:40 PM Malte Dehling <[email protected]> wrote:
> > >
> > > Hi Andrew,
> > >
> > > I've only tested the prom on physical hardware, and I haven't been
> able to get qemu to work with an ss20 and original prom recently.  Would
> love to hear if you make progress on this!
> >
> > well, for me setting -cpu to something like
> >
> > "TI SuperSparc 50"
>
> As I remember, the Qemu SuperSparc II implementation doesn't support
> one of the features used by the original OBP roms.
>

May be filling qemu-upstream bug about it will help, eventually?

I noticed that with original ROM -smp switch does not increase about of
firmware-counted CPUs ...


> >
> > work, at least i see logo and can enter probe-scisi.
> >
> > Note, this is more like qemu 9.2.50 as Artyom created it 9 months ago,
> > not really recent qemu git (10.x, 11.x)
> >
> > https://youtu.be/wCFBvzVCVMk - short vid of whole thing booting
> >
>
> I didn't notice that Artyom rebased my cg14 patches.  I also have a
> separate branch where I implemented the DBRI audio device.
>

Interesting, is this branch public?



> > >
> > > IIRC, qemu has resolutions hard coded in, but I may be wrong about
> this.
>
> Is there any particular resolution that you are looking for?
>
> The emulated cg14 was flexible enough to handle any resolution that
> could be programmed.  However, the startup resolution is limited by
> the monitor ID bits.  The cg14_set_monitor_id() function translates
> the Qemu command line resolution to a monitor ID for a nearby OBP
> resolution.  In addition to 1152x900, the resolutions of 1280x1024 and
> 1600x1280 should also work by default.
>

In my case I was after not so much resolution per se, but was trying to
avoid some strange emulated  TCX bugs, I can avoid most of them by running
xcompmgr& in NetBSD but something still not 100% correct with cinelerra-gg
and mplayer, colors are swapped in video output (plain X11, not xv), so I
was hoping to see if emulated cg14 can sidestep this issue



> Bob
>
>
> > >
> > > Cheers,
> > > Malte
> > >
> > >
> > > On Wed, Jan 7, 2026, 9:31 AM Andrew Randrianasulu <
> [email protected]> wrote:
> > >>
> > >> On Wed, Jan 7, 2026 at 8:00 PM Andrew Randrianasulu
> > >> <[email protected]> wrote:
> > >> >
> > >> > Was looking for Sparcstation-20 proms to test with cg14 enabled qemu
> > >> >
> > >> > found this project;
> > >> >
> > >> > https://github.com/mdehling/cg14-vesa-mod
> > >> >
> > >> > https://github.com/artyom-tarasenko/qemu/ - branch cg14
> > >> >
> https://github.com/artyom-tarasenko/qemu/commit/1b1d8b87619e613b059766e6e54687b027fb6e3f.diff
> > >> >
> > >> >
> https://github.com/artyom-tarasenko/qemu/commit/b297821755e68381e7753d877a7912bebe9271d8.diff
> > >> >
> > >> > but device cg14 not on list so you need to start it like this:
> > >> >
> > >> > build/qemu-system-sparc -M SS-20 -g 1152x900
> > >> > cg14_realizefn 1152, 900
> > >> >
> > >> > Of course default openbios does not know how to output to that, so
> I'm
> > >> > trying this Sun PROM now ...
> > >>
> > >>
> > >> It tries to boot my NetBSD install but it faults somewhere along the
> way:
> > >>
> > >>  build/qemu-system-sparc -M SS-20 -g 1152x900 -bios
> > >> ~/Desktop/ss20-2.25.bin  -cpu "TI SuperSparc 50" -hda
> > >> /mnt/zip/home/guest/QEMU/sparc-netbsd-15g-compressed-r1.qcow2
> > >> cg14_realizefn 1152, 900
> > >> CG14: control register (0x5a) has unimplemented bits set
> > >> CG14: readb from reg 1000
> > >> CG14: writeb 0x00 to reg 1000
> > >> CG14: writeb 0x01 to reg 1000
> > >> CG14: readb from reg 1000
> > >> CG14: readb from reg 1001
> > >> CG14: writeb 0x01 to reg d
> > >> CG14: readl 00000000 from reg 20c
> > >> CG14: writeb 0x02 to reg 100
> > >> CG14: readl 00000000 from reg 20c
> > >> CG14: readb from reg 200b
> > >> CG14: readb from reg c
> > >> CG14: writeb 0x00 to reg c
> > >> CG14: writeb 0x02 to reg 100
> > >> CG14: readl 00000000 from reg 20c
> > >> CG14: readb from reg 200b
> > >> CG14: readb from reg c
> > >> CG14: writeb 0x00 to reg c
> > >>
> > >> https://mastodon.online/@Andrew_R/115854999356998946
>