Do you have siliconmotion502.chip in your Kickstart?
Of course not :) Just default pegasos2 install cd :) I just thinking about it always, but somehow were sure i should see some output after 100% loading done, like "missing" , or some crash, or like kernel says something, etc..
Quote:
You can also set os4_commandline env var to get serial debug and use kernel.debug to see if kernel starts or not.
At least even with original firmware, when i boot to OF, and do "setenv os4_commandline test" i have "no such configuration variable", i should dig in into notes i am sure it was something simple..
@kas1e You could see output with os4_commandline set but that's also not default and on pegasos also needs to be defined with nodefaultbytes (there's a Forth script called bootloader_prepare for that on the install CD that you can call). And you need to do that at every boot because NVRAM is not emulated on QEMU so saveenv has nowhere to save.
You could see output with os4_commandline set but that's also not default and on pegasos also needs to be defined with nodefaultbytes (there's a Forth script called bootloader_prepare for that on the install CD that you can call). And you need to do that at every boot because NVRAM is not emulated on QEMU so saveenv has nowhere to save.
I simple create in OF code this variable being set , and after boot can simple do "setenv" , and yes, then:
gfx AltiVec/VMX enabled
gfx PPC74xx optimizations enabled
graphics.library cannot configure your graphics board!Either your board is not supported or there's a configuration problem.Did you install PCIGraphics.kmod?
That it then :)
ps. Making morphos boots too now. So some basics works. Next probably need to try to add x86 emulator, probably Uboot's one i use for patch for CFE can be used (hope it will be no slower than one in original firmware).
@all After all were able to add x86emulator from uboot (the one i use in CFE Patch for RadeonRx)! And good thing it fits fine to the 512KB limit of the flash size!
(click open in new tab for full size):
Also mimic a lot of other things which bplan do for original smart firmware, and even fixing one bug : filesize method wasnt' fully implemented. Not that it anyhow important for booting aos4/mos/linux, but still.
Still it have some hardcoding, and i test it for now only with serial and with atirage via ati-vga, and wish i could add support for bridges, so RadeonHD/RX via bridge can be seen in OF, that will be bombastic for real hardware
Anyway that mean that all major and hardcore "basic" work probably done in terms of SmartFirmware itself, but of course, that all with original bplan's bootstrap still.
@smarkusg For you with pegasos2 emulation "-device ati-vga,romfile=VGABIOS-lgpl-latest-banshee.bin" works ? I just tried now, and while rage roms works (all of them, tested 11 from rage128pro.zip), this banshee one always fallback to serial on original firmware, like didn't detect it. Same for my firmware with new x86emulator, so it seems like ati-vga didn't detect it ?
@Balaton I also tested ATI Radeon 7200 bioses and ATI Mobility Radeon (7000) bioses with ati-vga, both also fail be it original or my firmware. Is it expected that only Rage ones works ? Reading the https://codeberg.org/qmiga/pages/wiki/SubprojectAti make me think that 7000 should work to some degree as well ?
Also can you plz say if -device VGA and -device sm501 have proper VGA-through-BAR implementation, or they just "special qemu things" ? I mean did the have vga registers, vga planes, vga text mode or they pure framebuffer devices ?
Reason why i ask, because i implement x86emulator support via using framebuffer BAR (as original firmware seems to do as i can see), and not via ISA legacy address range (have issues with remaping and co about).
Edited by kas1e on 2026/4/21 6:48:54 Edited by kas1e on 2026/4/21 7:11:23
@kas1e VGABIOS-lgpl-latest-banshee.bin I think is for Voodoo emulation. Maybe you need VGABIOS-lgpl-latest.bin for plain VGA which should also work with ati-vga. Did you try R7000/RV100 bios with -device ati-vga,model=rv100? You probably need latest QEMU from git for that though as there were fixes recently in ati-vga. SM501 does not have VGA compatibility and thus VGA registers but -device VGA and ati-vga supports VGA modes and ports, these should be mapped in the ISA ports range where serial is where we found the clash with parallel port so I think original PegasosII ROM also accessses these registers. You can see ports in QEMU monitor with info mtree command.
Maybe you need VGABIOS-lgpl-latest.bin for plain VGA
Yeah, this one works ineed for both original and my firmware:
Quote:
which should also work with ati-vga
I tried on today's (21.04.2026) qemu sources, with parallel port fix applied, and nope, ati-vga with VGABIOS-lgpl-latest.bin rom didn't work.
There is the current state of things :
original firmware:
- "VGA" with VGABIOS-lgpl-latest.bin - works. - "VGA" with default seabios's vgabios-stdvga.bin: not works, crashes in x86emulator.
- "ati-vga" with rage128progl16mb.VBI - works. - "ati-vga" with default vgabios-ati.bin: not works, same crash in x86emulator. - "ati-vga,model=rv100" with default vgabios-ati.bin: not works, same crash in x86emulator.
- "currus-vga": not works, same crash in x86emulator.
My new firmware:
all cases works (include even cirrus-vga).
Then i tried rv100 with different roms, so with both my and original firmware those ones acts the same:
- "ati-vga,model=rv100" with radeon7200_155-155mhz.VBI: fallback to serial. - "ati-vga,model=rv100" with Connect3D_32mb32bit_144-288mhz.VBI: fallback to serial. - "ati-vga,model=rv100" with FSC_32mbsdr64bit_155-155mhz.VBI: freeze in POST, even no crash in emulator
Checked ati-vga and find out that it simple hardcoded to specific device IDs (5046 and 5159), while Connect3D VBI is 1002:515A, radeon7200 VBI is 1002:5144, see:
I added those new 2 cards, and they start to freezes the same as FSC one, so kind of mean it's something in ati-vga , right ?
In end of all i tried to boot OS4 installation with simple "-ati-vga,model=rv100" , and while it didn't give me errors about card not found, it seems simple hangs, but that probably known issue too ?
@kas1e Yes, looks like VGABIOS-lgpl-latest.bin does not work with ati-vga. You need a ROM from a real card matching the emulated chip so only Rage128Pro and RV100 (M6/7000) might work. For cirrus-vga there's VGABIOS-lgpl-latest.cirrus.bin that might work with the bios emulator in original ROM (I haven't tested). It's known that default QEMU vgabios does not work with BIOS emulators in any AmigaNG I've tried they all seem to crash on an i368 opcode that these bios ROMs have. Maybe newer x86emu versions can handle that? The model=rv100 has bugs before QEMU v11.0.0 and even with that latest QEMU it's not emulated enough for any more advanced driver to work with so it won't work with AmigaOS. If you want to test with newer cards you'd need vfio-pci pass-through and a real card.
It's known that default QEMU vgabios does not work with BIOS emulators in any AmigaNG I've tried they all seem to crash on an i368 opcode that these bios ROMs have. Maybe newer x86emu versions can handle that?
New one crashes too at first, i had to tweak it in few places to make it work with default vga roms..
For now, after my firmware start to be "ok" for qemu at least in basic form, i tried to test it on real pegasos2 without reflashing the rom, as this is TSOP32 one, and which not that easy to replace:
(click open in new tab for fullsize)
This is STMicroelectronics M29F040B - a 4 Mbit (512 KB) NOR Flash chip, so i need to be careful, resolder it will be not that fun.
So for that i go that route : i simple load "smartfirmware.elf" from the original loaded smartfirmware, compiled just with different .ld script to have different load address (02000000) so just to not clash. And step by step fixing bugs which wasn't happens on qemu..
@kas1e Sounds like that could work as long as it's not a problem that original SmartFirmware may have changed something. I think you can also get to the IKARUS console by pressing ESC early then this should be before the SmartFirmware part has run so maybe you can upload your image via serial and start it to test it without original SmartFirmware part doing something before your version can run.
...If you want to test with newer cards you'd need vfio-pci pass-through and a real card....
If you need to check something, I’d be happy to help. I’m using vfio-pci pass-through on X86_64 QEMU. I have Radeon HD and Radeon RX graphics cards. I only use my machine for testing under AOS4. That’s not a problem for me. Let me know if you need anything.
@smarkusg Thanks! Once will have something worth to test that will be surely helpfull.
@Balaton Quote:
I think you can also get to the IKARUS
Do you think it possible to load up smartfirmware part through serial and run it from Ikarus console ? That sounds too good to be truth :) At least when i boot it and via serial come to it, i can't type more than one single letter mostly, and "space" didn't act as space.. I need to dig in to disassembly of the bootstrap code, it's not that big by the way.
Probably what can be done even if it didn't support "loading of data over serial" , its to wrote some small stub which will add maybe some command , or maybe will add functionality like "Reading serial continiusly" so i can "load" OF like that and jump to it.. But firstly need to find a way how to write/load stub, and if it will works.
Btw, do you aware if Radeon9xxx bioses anyhow buggy or have quirks ? Why i ask, because i use x86 emulator i take from UBOOT which i use in CFE patch for RadeonHD/RadeonRX almost without changes, and making it works with Qemu for all sort of bioses, but have hard times for real Radeon9250 for now.. OF course it can be simple SF integration which suck on my side, but aren't you aware about anything of that sort ? Or those bioses the same as others just should work at that all ?
@kas1e It's not documented apart from the partial list of commands in the wikipedia article but I think in IKARUS console you can send an address and a value to be written at that address and then advance address. That's all you need to upload code as hex bytes then you can jump to address to execute. You can get more fancy first uploading some loader to then upload and verify more code but I think it's not needed if SF already does checksum then just sending hex bytes would be enough if a bit slow. I don't know much about ATI cards, I never had one before I tried to emulate it so I only know what I documented on my qmiga.codeberg.page.
@Balaton Have good news: i fully reversed bootstrap's IKARUS , so know all the commands, what, when, etc. And it do have upload ! "z" command. And "g" indeed a jump to an address (just without exit to IKARUS).
So i spend last 24 hours to create full HOWTO about IKARUS (all commands, examples how to use, etc) and create simple uploader.py (700kb uploading in ~90s) by which you can upload any binary to ram, and then can be used putty again to set address and "g" to jump on, or it can be set in script to autoset/execute. Everything described as much as possible, so if you have interest you can link on your pages, there is:
I were able to find by Ghidra and address which is used next after IKARUS, so i can set it and "g" to conitnue to unpacking/running OF, and were able to loadup my smartfirmware.bin to 0x01000000, then set an address to 0x01000100 and execute from , and my firmware loads up just like it should , so better situation for testing without reflashing hardly can be imagined.
Now i only need to deal with this damn VGA initalisation, as have some issues with (i.e. can't make on QEMU ISA_Remap way to work, cam only use BAR one to make output work.. Need to find what else original smartfirmware do before VGA init, as original firmware surely use ISA_Remap way, and QEMU handle it well with ati-vga/rag128).
@kas1e Maybe you can update the wikipedia article with the IKARUS command docs so it's complete there. I'm not really interested in the pegasos2 firmware as I have BBoot and emulate enough of it in QEMU so I don't need it. That was the point for BBoot to get rid of the non-free non-distributable firmware for pegasos2. I'm not sure what ISA remap you talk about but isn't it mostly what I have in qemu/hw/ppc/pegasos.c::pegasos2_chipset_reset()? Maybe that's not complete and there's some more that the pegasos2 firmware does but I got that from tracing what the firmware ROM does and implemented that's needed for QEMU so may have omitted some non-emulated parts. I guess you probably can also check some mv6436x docs or drivers on how to set up mem windows. You probably need a PCI IO window somewhere to see the IO ports. This is emulated in qemu/hw/pci-host/mv64361.c::set_mem_windows() if you can't find other docs.
I'm not really interested in the pegasos2 firmware as I have BBoot and emulate enough of it in QEMU so I don't need it.
Bboot helps a lot of course, but that "kickstart.zip" sure not the cool thing : you can't work normally with the OS when you update kickstart files, because you need to remember that bboot.zip need to be updated too, and this kind of not very tasty, when you simple change the module for test, reboot, and didn't understand wtf happens because you forget to update kickstart.zip :)
Quote:
That was the point for BBoot to get rid of the non-free non-distributable firmware for pegasos2
Once i reimplement everything it will be also free-distributable. And also it will help real pegasos2 : i want to add bridges support (so to see OF on RadeonHD/RX via bridges), as well as ability to boot from sata cards and co.
Quote:
I'm not sure what ISA remap you talk about but isn't it mostly what I have in qemu/hw/ppc/pegasos.c::pegasos2_chipset_reset()? Maybe that's not complete and there's some more that the pegasos2 firmware does but I got that from tracing what the firmware ROM does and implemented that's needed for QEMU so may have omitted some non-emulated parts. I guess you probably can also check some mv6436x docs or drivers on how to set up mem windows. You probably need a PCI IO window somewhere to see the IO ports. This is emulated in qemu/hw/pci-host/mv64361.c::set_mem_windows() if you can't find other docs.