Cold boot works fine in emulators. TMSS should be satisfied as I am using the standard header layout + the official Sega ICD_BLK4 initialization code. The only custom code in my startup is some C support code (copy data segment, clear BSS) and I doubt that has anything to do with anything.
My game loop is structured:
startup code -> main() -> initialization (vdp settings, gemsinit() etc) -> enable interrupts (andi.w #$F8FF,sr) -> main falls through into a for(;;); loop -> logic is done every frame in vblankmain(). vblankmain() ends with an RTE and the code spins in the for loop until the next interrupt.
in vblankmain() I have some DMA wrapped in calls to gemsdmastart() / gemsdmaend(). Again, works fine in emulators from a cold boot, everything works as expected. In Exodus however after a soft reset it hangs on gemsdmastart(), particularly the bus request:
Code: Select all
move.w sr,-(SP) or.w #$0700,sr ; disable ints .dsretry move.w #$100,BUSREQ ; Z80 bus request on .dslp btst.b #0,BUSREQ ; spin on bus grant bne.s .dslp