Jump to content
IGNORED

Cartridge boot code?


swapd0

Recommended Posts

This is my cartridge boot code, it just copy the code to address 0x4000 and jumps there, but it doesn't work with TombRaider. But if I upload the out.jag file to the  Jaguar RAM at 0x4000 and have "this" ROM burned into the skunk board it works (I need it to load the assets).

 

What on the hell I'm doing wrong?, there are any difference (jaguar status) when I press up to launch the ROM and when I upload something using jcp?

 

This is driving me crazy. ?

 

	.include "jaguar/jaguar.inc"

	.org ROM + $2000

boot_code:
	move.w #$2700,sr			; disable all interrups
	move.w #0xffff,VI

	lea code_start,a0
	lea $4000.w,a1
	move.l #code_end,d7
	sub.l a0,d7
	asr.l #2,d7
.loop:
	move.l (a0)+,(a1)+
	dbf d7,.loop

	jmp $4000.w

	.long
assets:
	.incbin "assets.fs"

	.long
code_start:
	.incbin "out.jag"
	.long
code_end:

 

Link to comment
Share on other sites

1 hour ago, 42bs said:

You cannot copy with dbra then. Dbra uses the lower 16bits of the register. You need a sub.l #0x10000,D7 after the dbra.

Lol, what a stupid mistake!, it was a long time ago since I don't code for the 68000, only small routines, I bet that with a debugger I could find it very quickly.

  • Like 1
Link to comment
Share on other sites

6 hours ago, swapd0 said:

Lol, what a stupid mistake!, it was a long time ago since I don't code for the 68000, only small routines, I bet that with a debugger I could find it very quickly.

I know this. I mainly program ARM (work) and 65C02 (fun). When I switch to 68K or GPU/DSP I need to check back with the manual for certain opcodes.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...