Hey guys, ive been having a bit of trouble getting my binary programs burned to a cartridge.
Here is the breakdown of how the binary is prepped before burning..
I take a binary file that links and compiles at 4000 (ram) and has no header. i use a wrapper program i wrote that compiles and includes this binary file and immediately copys the file to ram an then jumps to the execution point. This wrapper program starts at 802000 and has no header either.
I then use the following on a windows machine to put the 8k universal header on the file.
I have verified with a hex editor that the 8k univseral header is added at this point.
I am able to load this file into project tempest emulator and virtual jaguar and run it without issues. It also runs perfectly fine like this on the skunkboard.
romsplit -w encrypted.rom which gives me a .HI and .LO file.
Now from everything ive seen the hi file goes on the top eprom spot on the cartridge and low in the other.
When i burn each chip the program and chip offset are both 000000. I just get a black screen after following this.
Any suggestions? do i need to byteswap the .hi and .lo files? am i missing a step here?
A stable black screen is a bit unusual, it could just indicate, that your program does a wrong video-initialization.
To check if the whole process of creating the Eprom-content is correct i suggest that you use a ROM-dump of an commercial game and treat it as you did with your own game-program.
Sounds ok for me, but what is the databus-width setting of the "univ.k3"-file?
Even if you mix them up you can check this out easily by swapping the 2 EPROMs.
As said above, your process-hanlding sounds ok for me.
Is the bit for showing the spinning cube set in that universal header?
If so: Does the screen go black immediatelly after booting the Jaguar or does the cube show up and the screen wents black after it?
I am unsure if the bit is set for the spinning cube in the header. Im not quite sure how to check this other than a hex editor and even them im not sure what id be looking for really.
The spinning jaguar cube does come up but thats due to it being a stub jag i think.
I really probably need a normal jaguar to test this stuff out on.
Ill try a copy of a 2mb game here and see what i come up with using the same process i listed above.
Edit: i was able to burn iron solder. all i did was split the rom file with the romsplit program and burned each portion to a chip.
It did show the jaguar logo here but then went to a red screen for 2 seconds and then started the game. my only guess is that it didnt pass encryption and the stub jag bios let it pass anyway. It didnt help that one of my chips on that burn didnt pass the verify stage but still worked.
Another update, ran the binary file through the Jiffi program to make a rom file and then used a windows hex editor to strip out the padding. testing the rom file after stripping out the padding and worked just fine. then used romsplit and split the rom and burned on to respectiv chips, still a black screen.. unsure what the deal is here. i am not using the official atari video startup (udg one) so this may play a role im guessing?
Even though, why would it work on the skunkboard and alpine board and then throw issues when burned to a cartridge?
The fact that a normal game runs fine is pretty strange... if the endianness or the bus width had been wrong, it wouldn't run... (note for Matthias : the universal header is set for 32-bit bus width).
There's the possibility that your program doesn't initialize a register that happens to be set correctly when running on a Skunkboard, but not on a Stubulator BIOS. Try checking that you're initializing the video registers properly, especially VI.
I was setting the VI register early on in the code but.. ive eliminated my startup code all together now and just used the atari startup.s file instead to get the system up and running. seems to work fine so far when testing.
Can anyone shed some light on which method would be better suited for encrypting/splitting the roms??
Should i just use the jagcrypt.exe program which splits and encrypts or just use the manual copy of the univ.k3y file onto the binary and then use the atari romsplit.exe file?? does it really matter??
Is there a preferred method here to use?
Just burned eproms again here, this time i used the atari video startup sequence/system init file supplied with the SDK. Didnt work (suprise ) this was however just in the program that is transfered to ram by the wrapper program.
move.l #STOPOBJ,d0 ; stop the obj processor.
in the wrapper program? should disable video and set obj processor to a stop object so the system wont crash... that would be my best guess as to why its doing nothing afterwards...... could be crashing before it even starts the copy of the program to ram??
Or i could possibly use the startup.s (atari sys startup file) AS the wrapper program to setup the system and then throw in some copy code to load the binary to ram and jump to the ram location.... the binary file would just not have the sys init stuff and would perform the normal functions of what its designed to do.
Anyone see any issues with either method?
All fixed though, the above code when added with a basic copy loop for the binary file works like a charm!
not quite 100 percent sure what im missing here but my best guess would be a transition from the list with a stop object in the loader program to a fully populated list when the program in ram takes over.
Yop ! Hum, quick idea... Is the stop object of your loader program in RAM ?
i can however relocate this..
Do you think it may hve to do with the transition from a stop obj to a real list by chance? waiting until an interrupt completes now prior to loading in the list is how ive got it setup at the moment, but this is within the program thats loaded to ram. one the loader program dumps the binary file to ram it that program in ram takes over and finishes setting up a few system settings.
Ill see if i can post a snip of code of how i have it setup at the moment when i get home.
Although the OLP-register is a full 32bit-Register, the Link-adresses contained in the objects are only 19+3 bits wide, therefore all of these linked objects need to be placed within the lower 4MB of the Jaguars address space. This might indicate that this restriction is true for the very first object as well, which would mean that the object-list always needs to be placed in RAM.
Using the 68000 for this is no problem as long as the writes of the two 16bit-words isn't interrupted, but using a RISC processor is more safe.
Matthias and Matmook, thanks for the replies.
This seems to work very well and my loader loop loads my binary to ram which and executes. Seems my program startup is a little screwy because ive tried the same thing using just the atari startup.s file as its own binary to just display the licensed to or by logo and this loads perfectly fine, however when swapping the binary loaded to ram it seems my program is not initializing something right.... Sound plays but garbled scaled graphics appear.
Atleast im in the right direction now though Thanks to all.
Because we don't know where the OP list is so we can accidentaly erased it when copying ROM to DRAM ?
which means your stack will point at $0, and your program might crash if you're not setting the stack afterwards! I found this the hard way a couple of years back .
im using the older linker/compiler at the moment.
Looks like the code matthias posted from bastian schick helped alleviate a few problems. Using this prior to everything in my program and then setting up the stack again and initializing video and other basics it works with no problems finally. I was able to test burn this to some chips and try it on a stub jag. It seems to boot properly every time now and even through the jag cd, but then again its still a stub jag. Id like to continue testing it on a full production system to make 100 % sure everything is still ok.
For now, i wont say its solved as i may speak too soon heh..
Looks as if this has solved the issue. Many thanks to those who have made suggestions and helped along the way.
I suppose I'd better share the results of my experiments here since they seem to work .