Re: [hatari-devel] SCU/VME register access?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 13/06/2024 à 22:03, Christian Zietz a écrit :
Nicolas Pomarède schrieb:

4) Nowhere else in the code do I see  that VEC_INT4 is used to set its
vector (except in Falcon case). Maybe there's a not so explicit case
that changes vectors[VEC_INT4], but I don't see it

When VBL occurs we see it calls bad_inthandler that was set in 3), and
not some random handler, so I think VBR is correctly used.

All in all, it seems that the code enable vsync in TT mode but doesn't
replace bad_inthandler with another valid handler.

Note that there *was* another user of 'IRQ_AUTO_4', i.e., the VBL interrupt. A VBL IRQ handler was set by the framebuffer console driver. However, this code was removed in 2009: https://github.com/torvalds/linux/commit/1fa0b29f3a43f9dd8080d24cd16790b15ef963f5.

I can imagine no one remembered back then to either disable the VBL IRQ on the TT or to install a dummy handler.

Hi

nice find ;)

in current code they say sys_mask is set to 0x10 for the cursor, but if cursor code itself and its VBL handler was removed before, then there's a problem :(

so I modified my SCU version of Hatari to ignore write 0x10 to sys_mask and to store 0x00 instead and ... it works :)

Well, it crashes later, but that's at the same place it crashes on Falcon and it's because I'm not using the correct root disk image (as Eero wrote in another mail)

and now if I run :

~/src/hatari.scu/src/hatari --machine tt --tos tos306fr.img --dsp off --fpu 68882 --mmu on -s 14 --ttram 64 --addr24 off -c lilo.cfg --lilo "debug=nfcon root=/dev/sda ro init=/init" --trace vme --ide-master klibc-rootfs.img


it works ;-) Linux boot and drop me in a busybox shell from which I can run 'ls' for example.

So, similar to SystemV (as discussed on atari-forum) it seems linux doesn't need hsync nor vsync interrupt and sys_mask at ff8e01 should be set to 0x00 and not 0x10.

I guess it would work also if we set vectos[VEC_INT4] in current code for TT (Eero sent me such image, I will check later), but it's certainly cleaner to completely disable vsync and hsync in SCU sys_mask


I need to finish some cleanup in the new SCU code and I will commit it soon to main tree.


Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/