Showing posts with label cg14. Show all posts
Showing posts with label cg14. Show all posts

Sunday, April 20, 2025

rebased cgfourteen patches from Bob Breuer

Have rebased Bob's patches for cg14, so it's possible to compile it with recent QEMU versions with with recent tooling.

The patch can be found here: https://github.com/artyom-tarasenko/qemu/commit/1b1d8b87619e613b059766e6e54687b027fb6e3f .

reset is necessary to continue

For some reason OBP doesn't detect a DBRI stub in the SBus slot E. So for now, just exclude it from the probe list:

setenv sbus-probe-list f0123

Also, unless you have a rarp/bootp server set up, you probably want to turn auto-boot off:

setenv auto-boot? false
reset

Otherwise, the QEMU monitor has to be used to send a Stop-A combination

sendkey stop-a

After reset it's possbile to boot Solaris kernel with

boot cdrom -vsb



As it turned out, Bob did a great job gathering the available infos for cg14/SX:

https://github.com/breuerr/qemu/wiki/SX

Now I finally know what does "SPAM" mean. It's Sun Pixel Arithmetic Memory.

I found the article "Pixel Processing in a Memory Controller"  from Walt Donovan et all referenced by Bob. Very interesting from the historic point of view. Looks like Sun invented the built-in in chipset graphic card some years before it appeared in the x86 World.

For instance, transpose would look like this:

-- Read in a block 12 pixels
-- by 8 pixels.
ldld(src-addr, Rblock, 12)
... seven more loads ...
-- Gather each row and store into
-- memory at dst.
gath(Rblock, 8, Rrow, 8)
stld(dst-addr, Rrow, 8)
gath(Rblock+l2, 8, Rrow, 8)
stld(dst-addr, Rrow, 8)
... ten more gath/stld ...

Of course there are no instruction codes in the article, but I think they can be deducted from the Solaris driver.

The article has also a list of acknowledgments. These people are the pioneers in the single chip MMU graphic:

"The basic conception of the SX originated with Tim Van Hook. Van Hook, Vicki Woolf, and Ray Roth were major contributors in developing the SX chip architecture and the SX instruction set. Andy Bechtolsheim identified
the market opportunity for a low-cost pixel processor.
 

We would like to thank the rest of the SX hardware and software team-Miriam Blatt, Gloria Chen, Huimei Chen, Larry Fiedler, David Gibbs, Kevin Hayes, Don
Hejna, Samuel Ho, Brad Hoffert, Jens Horstmann, Steve Howell, Alan Hsu, Steve Huang, Rick Iwamoto, Amandeep Jabbi, John Johnson, Ashvin Kamaraju,
Byung Kim, Tayfun Kocaoglu, Mark Loomis, Barry Medoff, Conan Mishler, Jamshy Mostoufi, Jasvinder Nijjar, Greg Onufer, Bill Radke, John Recker, Jean Sheu,
Shawn Storm, Richard Tom, Haiduong Vo, John Watkins, Jung Wu, and David Yen-for their efforts in designing and implementing the SX and the target workstation
".

Sunday, October 21, 2018

a few more words on cgfourteen


A customer asked me if he’ll ever gets a chance to watch HD movies on an emulated SPARC machine. At first, I was going to say never ever, but then I looked at the specs of some ancient adapters and got surprised.  The SGI machines were commonly known for good graphics, but it never occurred to me that Sun machines were really powerful as well.
The cgfourteen (cg14) adapter could show Full-HD (1920x1080) pictures back in 1993!
Since the manufacturers sometimes claim just the theoretic abilities of the chipset, I wanted to check that the software has been really aware of such graphic modes in early nineties.
So, I gave a spin to the old cgfourteen patch from Bob Breuer. And here we go.
 
SPARCstation 20 OBP supports 1920x1080
Overall the cgfourteen adapter was really powerful. Michael Lorenz who added the hardware acceleration support for cgfourteen to NetBSD, wrote “SX has plenty of registers (128 - eight of them have special functions, the rest is free for all) and every instruction takes a count to operate on several subsequent registers or memory locations (ALU ops can use up to 16, memory accesses up to 32). SX supports some parallelism too - the ALUs can do up to two 16bit multiplications and two other arithmetic or logical ops per clock cycle (32bit multiplications use both ALUs).

The bad news is that Bob’s patch doesn’t implement the SX rendering engine. Also, the Solaris (or rather OpenWindows) driver is very much bound to sun4m SRMMU, so it won’t work on sun4u machines.

Would really like to have the emulation of a graphic card which would be better than cgthree, and ideally would work on both sun4m and sun4u machines, but it’s not easy.

Right now, I’m choosing between cgsix and creator ffb, but none of them has public documentation.

P.S. A funny fact about the Solaris SX driver: there are lots of symbols which have the word “SPAM” in a name. It can spamify and unspamify.  It’s really hard to google what it could mean back in nineties. “M” is probably for “Memory”.

Saturday, May 29, 2010

SX framebuffer emulation

Bob Breuer implemented the cgfourteen framebuffer for SS-20. This is the great news for those who wait for NeXTStep/sparc emulation under qemu!


With one hack that I used last year for booting Solaris 2.5.1, it's possible to boot the early Solaris versions (2.3-2.5.1) with a color graphics. There is still a problem with y2k10 bug with Solaris 2.4-2.5.1 under qemu.

sparc-softmmu/qemu-system-sparc -M SS-20 -bios /path/to/ss20_v2.22.3.bin -hdb /path/to/Solaris23.iso -m 64 -cpu "TI SuperSparc 50"

sparc-softmmu/qemu-system-sparc -M SS-20 -bios /path/to/ss20_v2.22.3.bin -hdb /path/to/Solaris251.iso -m 64 -cpu "Ross RT620" -startdate "2009-09-05"

Right now it sometimes complains about

zs3: ring buffer overflow

when you do something with the mouse. But this issue is not SX/cg14 related.

Also some OBP versions are not happy with the DBRI emulation. Under these versions instead of booting directly, detection of the DBRI has to be switched off:

ok setenv sbus-probe-list f
ok reset