Jump to content
Sporadic

Checkered Flag ROM Compilation and source tweaks

Recommended Posts

Hi all,

 

Some of us have been discussing this elsewhere and we thought the AA forum would be a better location.

 

I started messing around with the Checkered Flag source a few months ago with a view to "can it be improved". Before you get excited, the answer is 'not yet'. However, some other guys have started discussing this now too so I thought it would be best to share what I had so far.

 

Before even getting to try and improve it, there were a couple of hurdles;

- The "Final Rev9 Source" is missing 7 graphic assets and some ROM compilation set up.

- Once you get the ROM built - it runs great in VJ but crashes on real hardware.

 

First up, the assets... Talking to CJ about this, he managed to track them down in the release binary and send them over. Thanks CJ!

 

Next came building the ROM. I played around with the makefile and noticed rom.rsp was also missing from the source. This is the file used to include all the relevant assets in the final binary. There's no way to know what this should have contained so all i've done is copy and rename the big.rsp file (to preserve the original). I then added a new label newrom.rom: to the makefile with some relevant parameters (text,data,bss start addresses etc). It then built a ROM. (I also had to take out all calls in the makefiles to 'touch.exe' as this no longer exists and we shouldn't really need it).

 

The ROM wouldn't work on real hardware. Through further poking around it looks as though (because this was developed on an Alpine) there is code that runs to copy data to the ROM space (and other things). In a read only environment like a skunk at run time, this isn't going to work. However, taking out those calls (by rts-ing them on entry) seemed to do the trick.

 

Finally it was up and running on the Jag.

 

There are two final points regarding things not working;

- There are hills/mountains missing - I think this is due to the normal data missing from the 3D dataset. This results in them being culled at run time. If you take out the culling, they appear (along with other artefacts for obvious reasons).

- The rain overlay doesn't work correctly.

 

Anyway, attached is a zip containing the source with my changes, the missing assets and a readme.txt that details what i've changed/found/observed etc.

 

The attached source should compile and run on the Jag - but it's been a few months since I tested it. Any problems then shout and i'll fix it up - I just can't test it right now from work.

 

Rik

CheckeredFlagRev9-ROMFixed_Sporadic220119.zip

  • Like 15

Share this post


Link to post
Share on other sites

Thanks for this! I was able to get the sky textures working in my build thanks to the missing assets you posted to FB, this is Chad btw.

  • Like 4

Share this post


Link to post
Share on other sites

Hey Rik, no go for me on VJ or Skunk with the abs file compiled. I might of missed something though, just an FYI. I'm sure Clint will try it later as well.

 

 

Nevermind I can't read lol, trying to build the rom now!

Edited by BeefMan

Share this post


Link to post
Share on other sites

Hey Rik, no go for me on VJ or Skunk with the abs file compiled. I might of missed something though, just an FYI. I'm sure Clint will try it later as well.

 

 

Nevermind I can't read lol, trying to build the rom now!

hehe, yes, use the ROM. That one worked for me in VJ - i just couldn't test it on HW today.

 

nmake newrom.rom

Edited by Sporadic

Share this post


Link to post
Share on other sites

So nmake says it can't run in DOS mode when I try to run it from DOSBox and errors out if I try from Windows 10 command line. Any ideas?

Share this post


Link to post
Share on other sites

So nmake says it can't run in DOS mode when I try to run it from DOSBox and errors out if I try from Windows 10 command line. Any ideas?

Try this one;

 

(I've also been using dosbox, aln, mac etc due to wanting to keep the tools as close to the originals as possible - to rule out other unknowns)

NMAKE.zip

Edited by Sporadic

Share this post


Link to post
Share on other sites

Thanks for posting this up Rik and thanks again Chad for leading me into wasting hours on end on such a terrible thing ;-) ....but no, it's fun.

 

I can look for myself later but for the sake of discussion and a few questions:

 

•Rik, did you remove all 15 collisions or any at all? Also, did you end up changing the speed of the car at all from the default progression already in place?

 

•What are the earliest sources known to be available? I feel like we're playing really closely with the final source code prior to release seeing as how it was released the end of 1994 and edits are as late as October.

 

•I noticed what appears to be a polygon counter and a few other counters disabled (assuming this is what I think it is) would be interesting to see the information displayed and working. What's also interesting to note is just how little (in terms of numbers) polygons everything seems to be using - like the bridge is 13 IIRC, goofy stuff like that.

 

•It's interesting kind of sad to see just how many "this is placeholder" or "this needs to be improved later" or "we may want to reconsider this" notes are scattered throughout the entire thing. Not just a few, but a lot! Also the notes about being new to this or that and the "poor 68000" being used for 3D stuff is also fascinating... in a, ah-ha, so that's why kind of revelation.

 

•The final game is missing an actual attract mode which I'm guessing was scrapped because they ran out of time to actually implement it (similar to what WTR does) instead you just get a title screen and credits. The source does mention DEMO mode, which I'm only guessing is or was intended for an attract mode (it seems there are also notes pointing to that idea) but nothing concrete actually showing that it was working or possible to enable, at least nothing that I noticed, but I was skimming across it all last night over several hours as there's a ton of stuff to go through. It's massive.

Edited by Clint Thompson
  • Like 7

Share this post


Link to post
Share on other sites

Try this one;

 

(I've also been using dosbox, aln, mac etc due to wanting to keep the tools as close to the originals as possible - to rule out other unknowns)

 

 

Just to be certain are you running namke from within DosBox? When I run this specific version of the file it asks for another file called "DOSXNT.EXE". Before I go looking did you run into this or might you have a safe copy of this file?

Share this post


Link to post
Share on other sites

 

 

Just to be certain are you running namke from within DosBox? When I run this specific version of the file it asks for another file called "DOSXNT.EXE". Before I go looking did you run into this or might you have a safe copy of this file?

Here's most of the exe's i had to go looking for. This has the file you mention :)

Flag_BIN.zip

  • Like 2

Share this post


Link to post
Share on other sites

Thanks for posting this up Rik and thanks again Chad for leading me into wasting hours on end on such a terrible thing ;-) ....but no, it's fun.

 

I can look for myself later but for the sake of discussion and a few questions:

 

•Rik, did you remove all 15 collisions or any at all? Also, did you end up changing the speed of the car at all from the default progression already in place?

 

•What are the earliest sources known to be available? I feel like we're playing really closely with the final source code prior to release seeing as how it was released the end of 1994 and edits are as late as October.

 

•I noticed what appears to be a polygon counter and a few other counters disabled (assuming this is what I think it is) would be interesting to see the information displayed and working. What's also interesting to note is just how little (in terms of numbers) polygons everything seems to be using - like the bridge is 13 IIRC, goofy stuff like that.

 

•It's interesting kind of sad to see just how many "this is placeholder" or "this needs to be improved later" or "we may want to reconsider this" notes are scattered throughout the entire thing. Not just a few, but a lot! Also the notes about being new to this or that and the "poor 68000" being used for 3D stuff is also fascinating... in a, ah-ha, so that's why kind of revelation.

 

•The final game is missing an actual attract mode which I'm guessing was scrapped because they ran out of time to actually implement it (similar to what WTR does) instead you just get a title screen and credits. The source does mention DEMO mode, which I'm only guessing is or was intended for an attract mode (it seems there are also notes pointing to that idea) but nothing concrete actually showing that it was working or possible to enable, at least nothing that I noticed, but I was skimming across it all last night over several hours as there's a ton of stuff to go through. It's massive.

It is indeed interesting to go through it all. I was the same, i'd not compiled any old Jag sources before so setting up all the old tools via dosbox was a new experience for me.

 

To quickly answer your questions;

 

I did take out various collision checks (i can't remember which).

 

I didn't change the car speed/acceleration but i did mess with the steering speed and the third person camera swing rates/angle.

 

The rev9 source was the only one I could find out there on the interwebs. Certainly nothing that looked newer (and with the missing files). I don't know what else is out there.

 

Not messed with any of the counters or displaying of data. Yes it's very low poly which isn't surprising. All the road markings/arrows etc are all obviously 3d objects too. I think I also messed with removing some of those.

 

Yeah, I also found reading the source amusing and sad at the same time. Some amusing comments in there. It does do 3D stuff on the GPU - there are .GAS files for it. I can't remember if I worked out that the 68k poly code was "old code" which was rewritten on the GPU. There's something like 15 GPU programs in there for various things.

 

I also noticed the demo.s file. I think there is some code perhaps remmed out to call it - but i don't think it was finished. Interesting never the less.

 

I also tried things like changing/taking out the clear screen blitter calls just to see if they were slowing things down but taking them out didn't really effect much. Likewise, taking out the sky draws didn't really make much difference.

 

I'd like to pick it up again and keep looking but i got to a point where i was like "I really should get on with my other projects". But it's been fun to play with as a "change of scenery".

 

:D

  • Like 3

Share this post


Link to post
Share on other sites

How about nmaker.exe, you got a copy of that?

Lol sorry, did I not include that? Gimmie a mo (sorry, not sure how I missed that)

  • Like 1

Share this post


Link to post
Share on other sites

How about nmaker.exe, you got a copy of that?

Here you go. I didn't want to fill up the source.zip with the BINS, which is why i didn't include them.

 

Hopefully that's it now :)

NMAKER.zip

  • Like 2

Share this post


Link to post
Share on other sites

Here you go. I didn't want to fill up the source.zip with the BINS, which is why i didn't include them.

 

Hopefully that's it now :)

Thank you good sir! Would really like to learn more about your path of discovery on how you learned to build the ROM. Cool stuff!

 

 

-Chad

  • Like 2

Share this post


Link to post
Share on other sites

Thank you good sir! Would really like to learn more about your path of discovery on how you learned to build the ROM. Cool stuff!

 

 

-Chad

 

Thanks, you're welcome :)

 

It's all a bit of a blur now, I think I began by reading all I could find in the forum's, developer docs and online. Everything to do with compiling with the tools they used (looking at the makefiles gave a good indication here). I then went through each folder, running the makefile and fixing errors as they occured or searching around for the tool they'd used.

 

For a while, I shoved a dummy lzj file in for the backgrounds just so it would compile (I just took out the draw call).

 

Once I had the main makefile building the abs and running in VJ I got really excited that I'd made it to the end, only to be faced with it crashing on hardware. I think at this point, through looking around the code I figured ram was being used for run time storage of the 3d world and other things. Therefore, running as abs would be out the question. Then I started trying to get the ROM to build - I guessed at the text/data/bss addresses. Once built, the ROM still wouldn't work on hardware. At this point I added an infinite loop containing a background colour poke at the beginning of the code. This showed up on the Jaguar! At this point I was hopeful it was working just not fully. I then started moving the loop down to different sections of the startup code and running it on the Jag always seeing the background colour change until finally it didn't. This then led me to look around the area it failed where are saw the comment "copy data to ROM". Wtf? How's it able to copy to ROM? Was that a typo? No! On the Alpine you could enable writing to the ROM space! I then took out that call and similar looking ones and bingo! It booted to the menu.

  • Like 4

Share this post


Link to post
Share on other sites

Got the rom built and got it running in VJ and actual hardware!

 

 

-Chad

Excellent news! I also remember it seemed slower than the release version initially, but I can't remember if that was before the backgrounds were added.

Share this post


Link to post
Share on other sites

For a while, I shoved a dummy lzj file in for the backgrounds just so it would compile (I just took out the draw call).

 

Do you happen to remember where you disabled the draw call at exactly? Just curious so I can compare as I just shrunk it down a lot.

Edited by Clint Thompson

Share this post


Link to post
Share on other sites

 

Do you happen to remember where you disabled the draw call at exactly? Just curious so I can compare as I just shrunk it down a lot.

When I say backgrounds, I mean the sky. I also swapped it to a solid blue blank to try that out.

 

I can't remember off hand where it was. In car.s it's in the gameloop:: code. One of the jsr calls. Towards the end of the loop it calls the rle code? I'm going from memory as I'm not at the pc at the mo.

  • Like 1

Share this post


Link to post
Share on other sites

When I say backgrounds, I mean the sky. I also swapped it to a solid blue blank to try that out.

 

I can't remember off hand where it was. In car.s it's in the gameloop:: code. One of the jsr calls. Towards the end of the loop it calls the rle code? I'm going from memory as I'm not at the pc at the mo.

 

Yep, we're talking about the same thing - sorry I didn't specify better. I'll dig into it and see if I can find it now that you've given a hint of what it should be. Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

Ok, got it all setup building a ROM but I did notice this:

 

post-985-0-72709200-1548209952.png

 

Also, is this before the alterations you've made Rik or after? (in regards to additional tweakings outside of getting it to run properly as a ROM?) it's got wretched sound and screen tearing? at the top and the screen shakes up and down:

 

post-985-0-58300300-1548210031_thumb.jpg

Edited by Clint Thompson
  • Like 2

Share this post


Link to post
Share on other sites

Ok, got it all setup building a ROM but I did notice this:

 

attachicon.giferror.PNG

 

Also, is this before the alterations you've made Rik or after? (in regards to additional tweakings outside of getting it to run properly as a ROM?) it's got wretched sound and screen tearing? at the top and the screen shakes up and down:

 

attachicon.giftear.jpg

Yes I forgot about that happening, I had the same. I'll have a look later, I did manage to sort that out. It's the full screen transparent rain object if I remember correctly, it's killing the OP (it's there all the time even in sunny races).

 

I didn't want to upload my current source because there's various things I've played with and thought best to share the version closest to the original so people can play with that.

 

I also get those compilation filename warnings, I ignored them as they were warnings, not errors.

 

This screen tearing is one of the things I came across that made me think this can't have been the final source.

Edited by Sporadic
  • Like 2

Share this post


Link to post
Share on other sites

Ok, got it all setup building a ROM but I did notice this:

 

attachicon.giferror.PNG

 

Also, is this before the alterations you've made Rik or after? (in regards to additional tweakings outside of getting it to run properly as a ROM?) it's got wretched sound and screen tearing? at the top and the screen shakes up and down:

 

attachicon.giftear.jpg

 

Ok try this;

 

In car.s comment out these 4 lines.

; movea.w #(reset_list+Rono+9),a0 ; get address of rain object, 'first pixel' byte
; bsr Rand1 ; get random (word) number in d0
; bset.l #0,d0 ; make sure release is left on
; move.b d0,(a0)
Then these 4 further down (yes they are the same 4 lines);
; movea.w #(reset_list+Rono+9),a0 ; get address of rain object, 'first pixel' byte
; bsr Rand1 ; get random (word) number in d0
; bset.l #0,d0 ; make sure release is left on
; move.b d0,(a0)
Then in objdefs.s comment out these lines;
;ono set ono +1
;Rono == ono<<4
; dc.l Ranim ; starts off with data address
; dc.w ScnHt ; Height = full screen
; dc.w ScnSt ; Y start line = start of screen plus 2*line number
; dc.b $40 ; type = 0 (animated)
; ; phrase 1 completed
; dc.b 0 ; no pixel start offset
; dc.b $E ; RMW, trans, release
; dc.b 1 ; CLUT index = 1
; dc.w 6 ; 384 pixels - so that you won't get clear edge when using pixel offset
; dc.w 5 ; 320 pixels
; dc.b 1 ; pitch = 1
; dc.b 0 ; depth = 0 = 1 bit / pixel
; dc.w 0 ; X start = 0
This essentially removes the transparent rain object overlay from the game. I'm pretty sure this cured the tearing and sound.
I ended up playing with this object and kind of got it working (instead of removing it) but it wasn't right.
Edited by Sporadic
  • Like 4

Share this post


Link to post
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.

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