Jump to content
IGNORED

Latest BJL ROM Image


cubanismo

Recommended Posts

Please excuse me being crazy, but I BJL-modded my Jaguar tonight.  I used the method @Matthias describes on his page (and apparently in the HOWTO.DOC file within the BJL package), with a socket over the stock BIOS ROM and a switch to choose between them.  I was pretty nervous given my soldering skills are... not really skills, but it all worked out.  A few pictures (Using my 1MB/"bad" copy of Cybermorph and ghetto VGA cable for testing):

 

bjl_0.thumb.jpg.d0114de4ebd2c8ac4391f5ad001d4d42.jpgbjl_1.thumb.jpg.e6bea3ac58bdb3140d81ce299632a3f8.jpgbjl_2.thumb.jpg.4261a71e8339c50a69da95164900c8cf.jpg

 

However, note the version and date here: It's from 1997, supposedly the latest one, as indicated by @42bs on the BJL web page.  However, looking here: http://www.mdgames.de/bjl_loader.htm#Programming, there's clearly one from as late as 2005, and I've seen references elsewhere to the BJL loader ROM image containing games/easter-eggs/etc. that this one clearly doesn't.  I can't find that ROM image anywhere.  Can anyone point me to it, ideally before I reassemble this mess?

  • Like 3
Link to comment
Share on other sites

Well, I found DEBJAG48.IMG dated 1/15/1999 in the bjl_dos.zip file which is more in line with what @42bs claims is the latest build on the website, but that's still quite a bit short of 2005 ?  It looks like I ordered OTP EPROMS (AT27C010-70PU, first non-obsolete part I found matching the two recommended in Matthias's guide) rather than UV EPROMS or flash (If you're trying this yourself, don't be as hasty as me.  A tiny bit of searching on digikey turns up flash chips - SST39SF010A-70-4C-PHE that would probably work) by mistake, and I only have one spare, so I'd like to make sure I get the real latest one before I try again!

Link to comment
Share on other sites

Yeah, that was my understanding as well.  I thought I was all set until I went to download the ROM image and happened to click on Matthias's loader info link, then found a few other references on Google.  I'm wondering if the kit sold by More Than Games in the 2000's had a custom updated version or something.  If so, and it's not available elsewhere, perhaps someone who has it could dump theirs and post it?  I'd owe you a favor ?

 

If the only difference is some games, I'm not that fussed.  I've played Tetris, I have a Jiffi CD of the Painter demo.  I just want to make sure I have all the latest loader functions: both 4 and 8 bit, 2nd magic word for raw data loads, all the diagnostic/status messages, and anything else.  I can always BJL load the latest loader first if I can find a binary of that later, but it would be nicer to just have the latest version at boot.

Link to comment
Share on other sites

OK, I went deep searching for this mysterious 2005 version of the BJL loader.  I found very few references to it outside of @Matthias's own mentions.  There's this brief mention of a 2005 uploader being the latest:

 

http://forums.atari.org/read.php3?num=7&id=921&loc=0&thread=921

 

The above mention in Matthias's BJL guides, and someone else doing the same thing I'm trying to do: Dig up where it came from here on the AtariAge forums, to which Matthias actually replied.  It sounds like even he doesn't know where it came from though:

 

There is a link to the Jaguar-side loader binary there at least though, and the binary of the DOS PC-side uploader program.  This just leaves me wondering where either of these actually originated, where's the source to the PC-side loader (I'd like to integrate it into my lightly-updated version of @Zerosquare's lo_inp here), etc.  Also, I can't find anywhere you can actually download the larger BJL ROM images that have the demos/games in them, other than the one ZeroSquare linked above (Thanks!).  Someone built them though, and it's frustrating that I can google up pretty much every actual Jaguar commercial game ROM in ~30 seconds, but I can't find an actual legal mod ROM anywhere after several hours of searching.

 

The main thing I'm interested in is the extra "-d" option that lets you upload data without automatically running it afterwards so you can pre-load data into RAM, which only seems to be in this version of the ROM and uploader.  It's not a huge deal since you can generally just -ii things when linking, but I found this really helpful when I was testing cinepak video clips recently on the skunk and iterating through them quite quickly, so it would be nice to have the equivalent in BJL too.  And honestly, the quest to find it has generated its own motivation at this point.  Since I went through all the trouble of delicately disassembling my Jaguar, I don't really feel like settling.  Now that I've wasted several hours researching it, I'm even less inclined to stick with some "lesser" version ?

 

Absent other clues, I think I'm going to load up the last loader.bin available from @42bs's website and the one Matthias provided in hex editors and/or disassemble them, see how much difference there really is, and see if I can munge the newer loader.bin into ZeroSquare's ROM image above and reverse engineer the '-d' option in the uploader from Matthias's description of it on his website (I'm assuming it just uses the alternate magic word to kick off the upload and does everything else pretty much the same).  Seems like every project spawns ~2 more projects.

Link to comment
Share on other sites

1 minute ago, JagChris said:

Did you look around first to see if anyone had a skunk to buy? I guess it's probably too late now 

Uh...

30 minutes ago, cubanismo said:

I found this really helpful when I was testing cinepak video clips recently on the skunk and iterating through them quite quickly, so it would be nice to have the equivalent in BJL too.

I have a skunkboard.  There are only bad reasons (E.g., I have one skunk and two Jaguars, skunkboards are mildly hard to come by and are expensive, Gamedrives aren't widely available yet, I feel like I might want to build my own skunkboard at some point, etc.) for me to be doing this.  I'm doing it anyway.

 

Also, for posterity, I think I found another location of the full 1.06 ROM image: https://rdemming.home.xs4all.nl/Atari/JaguarBIOS/index.htm.  Still need to compare this to ZeroSquare's.

Link to comment
Share on other sites

Apologies myself, I try to avoid that tone.  I didn't explicitly mention that I had a skunk, and I've been posting walls of text here.  As I alluded to, I'm not doing this for any good/sane reason.  I'm doing it for fun, though it was clearly aggravating me last night.

Edited by cubanismo
s/same/sane
Link to comment
Share on other sites

I still have have a couple New old More Then Game BJL mod kits still on my work bench. Funny I was just looking at one the other day.  Not sure what version rom is on them. I think I got these around 2007/2008.  My actual BJL jaguar is deep somewhere in storage so cant boot her up to see. But if you want one of the MTG rom chips send me PM 

  • Like 1
Link to comment
Share on other sites

1 hour ago, cubanismo said:

Apologies myself, I try to avoid that tone.  I didn't explicitly mention that I had a skunk, and I've been posting walls of text here.  As I alluded to, I'm not doing this for any good/sane reason.  I'm doing it for fun, though it was clearly aggravating me last night.

Yeah you did mention you had a skunk so no worries. I was just reading it after s couple beers thinking oh no people still needing to modify their jags this late in history

  • Like 1
Link to comment
Share on other sites

For anyone interested, I finished of the mechanics of the mod, cleaned everything up, and reassembled the Jaguar for now.  Will be pretty easy to pop the top shell & top RF shield off and swap the ROM chip out when I get to a final version, and I wanted to finish modding the case to make sure the physical aspects of it worked out as expected and get my desk cleared off for other projects.

 

Note the wires for the BJL switch are routed poorly in the open-case picture here.  I should have hot-glued them so they would have gone straight down in the picture after going past the side of the bottom RF shielding cage, rather then continuing on to the left.  They're wedged between the two RF shielding cages, preventing the metal tabs from being twisted back into place when assembled like this.

 

The 2nd switch here is a 50/60Hz switch so I can test code in both modes.  It also keeps the modified case symmetric.  I found several pictures of alternate switch placement options, but this seemed like the least invasive version that used simple toggle switches.  I had to snip a tiny bit of RF shielding off with my tin snips to get clearance for the internal part of the switch mounting bracket, but you probably wouldn't even notice it was gone if the switches weren't there.  It was still a rather tight fit between the RF shielding and the plastic shell though!  As an added bonus, with this placement you can't even tell the Jaguar has been altered if the regular BIOS is active and you're looking at the console from the front.

 

I was a little sloppy drilling the hole for the switch near the RF connector, so if you look at it closely you can see a bit of the hole in the case around the washer.  I think rather than attempting to place a 1/4" hole (the diameter of the switch) perfectly right off the bat, I should have drilled a smaller hole, fed the toggle arm of the switch through it to check the exact alignment, then used my round file to enlarge the hole in the right direction, or just run the 1/4" bit through it at that point if I happened to get it dead center.  Overall, I'm pretty pleased with the results though.  Now on to getting that loader ROM updated...

 

bjl-03.thumb.jpg.4403939f58da0ecb867377807df4739c.jpgbjl-04.thumb.jpg.918661e07b0d83e15bde7176a2c595f3.jpg

Edited by cubanismo
Added a note on a better method for placing the case holes perfectly
  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Two updates on the mysterious 2005 BJL loader here:

  • Thank you to @oakcitycomics for sending me an original More Than Games BJL ROM.  Unfortunately, it contained the same 1.06.0/1999 loader that has been pasted in this thread twice now.  Still, it's a cool piece of history.
  • Since the above was the most likely outcome from that venture anyway, I loaded up the 1.06.0 BJL ROM image in radare2's Cutter GUI and started digging through it a few days ago, learning that set of tools' idiosyncrasies as I went.  Don't have much love for radare2 right now.  However, it worked well enough that I got the information I needed.  It was pretty easy to locate the loader code in the 1999 boot ROM.  Unfortunately, and as expected, it was not at the end of the ROM.  The 2005 loader is slightly larger than the 1999 one, so I had to determine whether dropping it into the middle of the 1999 ROM would perturb any offsets or branches referencing anything after the loader.  Luckily, it appears the only things after the loader in the ROM are the raw bytes of the games/demos, and even that is all referenced via a single subroutine as offsets relative to the end of the loader code, so all I had to do was modify one instruction to account for the larger loader code and voila: A BJL boot ROM with the 2005 loader code!  It took me 3 long nights with my feeble reverse engineering skills and still-lacking m68k assembly knowledge to figure that out.

I also tweaked the version string to report version 1.06.1 and today's date, to differentiate it from the old ROM.  I still need to modify my uploader to support the new 2005 loader's data uploading option so I can fully verify it (I can't be bothered to get a DOS computer working to test with the one @Matthias shared), but it's looking good so far.  The games & demos still work.  The basic loader functionality works.  I won't post the full updated ROM image until I've tested it a bit more (@42bs, @Matthias, if you don't want this posted for whatever reason, please PM me or respond here.  Given I'm just assembling various already-public bits, I'm assuming it won't offend anyone unless told otherwise), but if anyone savvy is dying to try out a bleeding edge BJL boot ROM, here's the little program I wrote to do the bulk of the patching to the 1.06.0 ROM image, and the radiff2 output showing the minor modifications I made on top of that:

#include <stdio.h>

int main(int argc, char *argv[]) {
	FILE *bjl16 = fopen("BJL-1.06.0.bin", "rb");
	FILE *newl = fopen("loader-2005.bin", "rb");
	FILE *bjl17 = fopen("BJL-1.06.1.bin", "wb");
	static const long oldLoaderStart = 0x2088;
	static const long oldLoaderEnd = 0x31a4;
	long newLoaderEnd;
	long i, j;
	unsigned char c;

	if (!bjl16 || !newl || !bjl17) {
		printf("Failed to open one of the files\n");
		return 1;
	}

	printf("Copying start of old boot ROM\n");

	for (long i = 0; i < oldLoaderStart; i++) {
		if (1 != fread(&c, 1, 1, bjl16)) {
			printf("Failed read old boot ROM\n");
			return 1;
		}

		if (1 != fwrite(&c, 1, 1, bjl17)) {
			printf("Failed copy old boot ROM\n");
			return 1;
		}
	}

	fseek(newl, 0, SEEK_END);
	newLoaderEnd = ftell(newl);
	fseek(newl, 0, SEEK_SET);

	printf("Inserting 0x%08lx bytes of new loader\n", newLoaderEnd);

	for (long i = 0; i < newLoaderEnd; i++) {
		if (1 != fread(&c, 1, 1, newl)) {
			printf("Failed read new loader\n");
			return 1;
		}

		if (1 != fwrite(&c, 1, 1, bjl17)) {
			printf("Failed copy new loader\n");
			return 1;
		}
	}

	if (newLoaderEnd & 3) {
		long endAligned = (newLoaderEnd + 3l) & ~3l;
		printf("Inserting %ld 0 bytes to make end of loader dword aligned\n", endAligned - newLoaderEnd);
		c = 0;
		for (i = 0; i < endAligned - newLoaderEnd; i++) {
			if (1 != fwrite(&c, 1, 1, bjl17)) {
				printf("Failed copy new loader\n");
				return 1;
			}
		}
	}

	printf("Inserting rest of old boot ROM\n");

	fseek(bjl16, oldLoaderEnd, SEEK_SET);

	while (fread(&c, 1, 1, bjl16) == 1) {
		if (1 != fwrite(&c, 1, 1, bjl17)) {
			printf("Failed copy old boot ROM games\n");
			return 1;
		}
	}

	printf("Done.\n");

	return 0;
}
0x00001c32 1572 => 165e 0x00001c32
0x00001ed7 30 => 31 0x00001ed7
0x00001ed9 3034 => 3233 0x00001ed9
0x00001edc 3136 => 3337 0x00001edc
0x00001edf 3234 => 3133 0x00001edf
0x00001ee3 31 => 37 0x00001ee3
0x00001ee5 3939 => 3230 0x00001ee5

 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, neo_rg said:

This of any use?

Thanks.  This looks like the BJL loader binary Matthias posted in the "BJL Loader Problem" thread I mentioned above.  It's just the raw loader binary (And a corresponding DOS uploader build), not a BJL boot ROM image.  It's useful if you want to BJL upload the loader to an existing BJL session, or incorporate the loader into your game.  However, what I've done is merge this same loader binary into the 1.06 BJL Boot ROM in place of the 1999 loader binary so it's available directly at boot.

  • Like 2
Link to comment
Share on other sites

OK, finished testing, so I'm attaching the full 1.06.1 ROM image.  Seems to work identically to the 1.06.0 ROM image, with the exception of the updated loader, as intended.

 

I've modified my fork of lo_inp to include the '-d' option to upload data without executing it, which was a pretty trivial change: https://github.com/cubanismo/lo_inp

 

If you need this burned, PM me.  I picked up a bunch of EPROMs in a sale recently.

 

BJL-1.06.1.bin

Edited by cubanismo
  • Like 5
Link to comment
Share on other sites

3 hours ago, cubanismo said:

OK, finished testing, so I'm attaching the full 1.06.1 ROM image.  Seems to work identically to the 1.06.0 ROM image, with the exception of the updated loader, as intended.

 

I've modified my fork of lo_inp to include the '-d' option to upload data without executing it, which was a pretty trivial change: https://github.com/cubanismo/lo_inp

 

If you need this burned, PM me.  I picked up a bunch of EPROMs in a sale recently.

 

BJL-1.06.1.bin 119.08 kB · 1 download

Good job. Actually I did a two step upload in the past as I did not want to erase/reprogram my EPROM with a new version.

 

Link to comment
Share on other sites

7 hours ago, 42bs said:

Good job. Actually I did a two step upload in the past as I did not want to erase/reprogram my EPROM with a new version.

Thanks!  Yes, the perfectionist in me took over.  In fact, I think there was actually enough room at the end of the ROM to just append the latest loader and overwrite the first few instructions of the old one to just jump to it, but even that would have left me feeling like the project was incomplete/suboptimal.  And of course, digging through the ROM was fun and a great learning experience (Now I know how to bootstrap the Jag from nothing, how to program the reset vector of a 68k, I got to fully appreciate the clever trick Atari did with the ROM image addressing that makes it just magically keep executing the next instruction even though programming the MEMCON registers moves it to a different location in memory, and in general I know a lot more about 68k assembly and parsing the joystick registers).

 

While I'm here, just want to note that I confirmed the SST39SF010A-70-4C-PHE flash chip works great, and allows for quick iteration if you're messing with your BIOS.  I've made a digikey cart share link containing everything you'll need for the mod, save some wires:

 

https://www.digikey.com/short/zbmb59

 

For the wires, I use these:

 

https://amzn.com/B01KQ2JNLI

Edited by cubanismo
  • Like 2
Link to comment
Share on other sites

8 hours ago, Zerosquare said:

@42bs: can you tell us what are the differences between the 1999 loader and the 2005 one? @cubanismo mentioned the new "-d" option; is there anything else?

I have no version of 2005, but the version with the games is prepared as back-end for debjag (a Bugaboo like debugger for the Jaguar).

But I need to dig into the source again, to find out the "how" (its from 1997).

 

Edit: While in the main screen you can send 16bit commands. I'll dig them out.
 

Edited by 42bs
  • Like 1
Link to comment
Share on other sites

Possible commands:

ReadWords         EQU $80
WriteWords        EQU $81
ReadEEPROM        EQU $82
StartSub          EQU $83
GPU               EQU $86
StopGPU           EQU $87
WriteLongs        EQU $88
ReadLongs         EQU $89
ReadWord          EQU $90
WriteWord         EQU $91
RESET             EQU $AB
STARTGAME         EQU $AC
RESTART_SUB       EQU $AE
STARTSUB          EQU $AF
TRACE_GPU         EQU $B0
WRITE_CARD        EQU $B1
StopDSP           EQU $B2
WriteEEPROM       EQU $B3
StartDSP          EQU $B4
SetDSPRegs        EQU $B5
SetGPURegs        EQU $B6
HyperLoad         EQU $B7
HyperLoad4Bit     EQU $B8
RAM_DEBUG         EQU $E0
CHECK_RAMDEBUG    EQU $E1
LOAD_RAMDEBUG     EQU $E2
RAM_DEBUG         EQU $E0
CHECK_RAMDEBUG    EQU $E1
LOAD_RAMDEBUG     EQU $E2
TEST              EQU $E9

The commands are sent as 16bit words/4 bit mode.

TEST for example, will then send back words from Jaguar to host.

HyperLoad will activate the 8bit loader.

But I never tried these commands with a PC, as debjag was only working on Atari STE/TT/Falcon

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

8 hours ago, 42bs said:

While in the main screen you can send 16bit commands. I'll dig them out.

Cool, this explains that 'other' input handling subroutine I was having trouble making sense of and the naming of some things in the uploader source.  All I could deduce was it handled port 2, so it must be doing BJL stuff, since it didn't line up with anything in the reference manual.

 

I had been toying with the idea of adding a "console mode" to lo_inp with a corresponding little library for apps to use it, similar to jcp -c/skunk.s for the Skunkboards.  I'd seen the debjag stuff in the 1997 BJL package on your site, the mindbg thing on jagware, and @swapd0
(right?) debugger and packet loader for BeOS, so I figured there would be plenty of examples to go off.  Guess I'll just open the loader ROM back up in Cutter first if I get to that project though ?

 

I know everyone has Skunkboards and gamedrives now, but I like that I can develop on any Jaguar with ~$15 of off-the-shelf parts and a little soldering.

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...