swapd0 Posted March 13, 2021 Share Posted March 13, 2021 Coding for the Jaguar is a nightmare... Ok, let's go to the topic and see if someone spot what I'm doing wrong. I've a something like a filesystem to get the assets from the ROM, (sounds, graphics or anything else), then I upload the game code to the skunk board (default address $4000) and play/test the game. Now I've the assets of three games burned together into the ROM, I upload the code of each game and it works. I've coded the menu to select a game and launch it, the code copy a small code at the end of the ram and run it, this small code copy the game to $4000 and jumps there. Now comes the funny thing. Game 1 works Game 2 you can see the menu, but it hangs when it shows the intro scene Game 3 you hear the music but no image, sometimes it runs but with glitches and I doesn't read very well the joypad (I've to press fire several times to start the game) Even if I call run_game at the start of the code it doesn't work. It looks like the Jaguar can't be initalizated two times, one for the menu, the other at the start of each game. I've no idea why this doesn't work. LOAD_ADDRESS .equ 2*1024*1024-64 ; end of ram ;_run_game(const void *begin, const void *end) _run_game:: move.w #$2700,sr move.w #$7fff,VI ; VI lea _copy_run,a0 move.l #LOAD_ADDRESS,a1 move.w #(_end_copy_run-_copy_run)/2-1,d7 .loop: move.w (a0)+,(a1)+ dbf d7,.loop move.l 4(sp),a0 move.l 8(sp),a1 jmp LOAD_ADDRESS _copy_run: move.l #$4000,a2 .loop: move.w (a0),$f00058 ; BG move.l (a0)+,(a2)+ cmp.l a0,a1 bge.s .loop jmp $4000.w _end_copy_run: Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.