Author Topic: Converting a game to ROM - and LOTS of ROM files inside!  (Read 83693 times)

0 Members and 1 Guest are viewing this topic.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #25 on: 20:25, 18 September 13 »
Dunno about Linux emulators....


You could generate a ROM using SB and save it to disc.


From DSK you can extract it (w/o header) to PC filesystem.


Then add the ROM to an emulator.




Let me know if there are questions to a particular step.
(Hope to get my car done tonite, then I can help more).
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #26 on: 21:49, 20 September 13 »
This is too complex for my little brain to handle.  :(

As far as I can see, the ROM file is created fine.
I use TFM's recipe, and generate a ROM file. This file cause a *CHECKSUM ERROR at boot.
Therefor I run the BASIC program TFM gave me, that runs though the code and adds a checksum value at the last byte and save it again.
Then all seems fine when starting, except calling the command just gives me a Ready. Nothing happens.

The file I'm testing with is the game Astro, and I tried the process twice now.

What am I missing?

Also... the whole Exomizer thing seems even more complex. What's the Excomizer command to use on a CPC binary?
If I run this command on a CPC binary, will it figure out for itself to depack before running, as seen with e.g. Relentless?

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #27 on: 22:08, 20 September 13 »
Aah....  after typing |astro I have to also CALL 35800 to start it....

So I need to learn how to force a binary to autostart first I guess...

Any easy way to do that?

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #28 on: 22:11, 20 September 13 »
Dammit. I see now that in order to use Exomizer I also have to add some code to decompress the file again.

There's no way I can figure out that part.

Anyone bored enough to convert some games into ROM files for me?  ::)


Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #29 on: 22:52, 20 September 13 »
Then all seems fine when starting, except calling the command just gives me a Ready. Nothing happens.

The file I'm testing with is the game Astro, and I tried the process twice now.

What am I missing?
- The binary program needs an auto start address.

- When adding an RSX with SB, enable the autostart feature.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #30 on: 22:56, 20 September 13 »
- The binary program needs an auto start address.

- When adding an RSX with SB, enable the autostart feature.

Oh... lemme try that.

I still need to "hire" someone for the games that takes up more than 16kb though.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #31 on: 23:18, 20 September 13 »
If Exomizer is too complex, then give MadRams great Turbocruncher a try.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #32 on: 23:20, 20 September 13 »
- When adding an RSX with SB, enable the autostart feature.

That doesn't seem to change anything...

If Exomizer is too complex, then give MadRams great Turbocruncher a try.

It's not the Exomizer part itself. It's that I have to write some assembler code to decompress it, according to this page:
Exomizer - CPCWiki

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #33 on: 00:25, 21 September 13 »
Yes, and therefore use TurboCruncher. It creates an output file which will self-decompress. Search for CPCT or so. I have the dsk at home, but not here at work. It's the most efficient cruncher on CPC (but not on PC, there it's exomizer).




Can you post the program, which does not work on as DSK here? Then I can check the problem.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #34 on: 07:41, 21 September 13 »
Yes, and therefore use TurboCruncher. It creates an output file which will self-decompress. Search for CPCT or so. I have the dsk at home, but not here at work. It's the most efficient cruncher on CPC (but not on PC, there it's exomizer).

Alright, I'll check it out. Thanks

Can you post the program, which does not work on as DSK here? Then I can check the problem.

Attached.
I noticed that SB didn't figure out the correct start address, so I changed that to the address called from BASIC.
Then caused Arnold to freeze at boot.
Then I tried again, selecting NO to autostart at boot, still using the start address called from the BASIC loader. Then it freeze when I call |astro
Obviously the whole problem is about the starting address... So looking closer at the BASIC loader, I spot the problem:
It's calling two addresses to start the game.
In line 540 it calls &8D80
And in line 550 it calls 35800
Any way to solve something like that, other than manually adding code to call two addresses?

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #35 on: 08:36, 21 September 13 »
Well, have tried TurboCruncher now. First thing I run into is the filesize limit of 34kb, when I tried processing Fruity Frank.
So I tried compressing Tempest instead.
I can't get the resulting compressed files running though, and in any case they're still (just) too big for a single rom.

I also notice that in most cases, a game consist of more than one BIN file. What to do in those cases?

Anyway, throwing in the towel. Hoping someone is bored enough to convert a few games. If there are, here are a few titles I'm interesting in:
- Fruity Frank (should be possible I think)
- Spindizzy (3 BIN files!)
- Dead on Time (wishful thinking probably, but 2-3 ROM slots is fine if possible)
- Radzone (doubtful possible, since it's BASIC with some RSX commands)

What about Donkey Kong, Killer Gorilla, Thrust, Oh Mummy, West bank, and Who Dares Wins II. Possible to convert any of those?

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1236
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #36 on: 18:35, 21 September 13 »
Killer Gorilla (I hope)... but it needs the checksum sorting out. (A public copy of that checksum program would be nice)
Also attached is the original .GAM file for said game! (&4000 & relocated to &A000 and unpacked)
« Last Edit: 18:39, 21 September 13 by tastefulmrship »
"I think you should worry less about who you might offend and care more about who you might inspire.”
— Mike Baxter

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #37 on: 18:42, 21 September 13 »
What is this? You mock me for not being able to do it, and then you post a half-way process?

I can do that too.

From now on, I will call you distastefulmrship.  :P

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1236
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #38 on: 18:48, 21 September 13 »
Fair enough! I'll leave you to it, then.
« Last Edit: 19:07, 21 September 13 by tastefulmrship »
"I think you should worry less about who you might offend and care more about who you might inspire.”
— Mike Baxter

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #39 on: 19:55, 21 September 13 »
So I download the KGORILLA.GAM file that distastefulmrship attached. I'm able to run it with a MEMORY &3FFF:LOAD"KGORILLA.GAM",&4000:CALL &4000 so I know that it works.

I then startup SB, and have it process the file. It says the file is too big, and requires two ROM files.

Ok, I let it create the two ROM files. Then I create a checksum, export from the DSK without header, and tries them. Doesn't work.

I then download the TESTFILE.ROM that distastefulmrship attached, and add a checksum to it. Export from the DSK without a header, and try it. Doesn't work.

I then download the KGORILLA.ROM file that distastefulmrship attached, and it works. WTF?!  (Except that it auto-starts on boot, but still: WTF?!)

I mean WHAT?! SOMEONE tell me wtf I'm doing wrong. It's the same 14kb file, KGORILLA.GAM, but SB tells ME (and apparently not distastefulmrship) that it's too big for 1 ROM.

Am I using some stupid old buggy version of SB or something?

Or maybe something is going wrong because I'm running the emulator using wine?


Ok.... giving up. It's rather clear I won't be getting anywhere, so I'm hereby offering 2 euro pr. game anyone would convert for me.  :)
If interested, PM me for a list (to avoid anyone converting the same game).
Games converted is free to put in the ROM list too. Thanks.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1236
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #40 on: 21:10, 21 September 13 »
[Stuff that means nothing really]
The problem is that the .BIN file that |SB spits out has a checksum error. That BASIC program that TFM gave you will correct the checksum problem, making the game work.

Try running any of my (or your) other .ROM/.BIN files through that "patcher" and I think you'll find they work. Any .ROM/.BIN file that works when you use T&J's ROM loader (from the 16k ROM compo thread)
Code: [Select]
10 LOAD "XXXXXX.ROM",&C000
20 CALL &C009
will work when the checksum has been corrected. THIS is why my projects are "half finished" as you say, because I do not have such a program and so can only get so far before having to stop.

And as for Exomizer, you need the Z80 depacker, this is why TFM told you to use a CPC packer that autoruns. It's far easier to use than going through the assembly program... however, as I mentioned, it's pretty easy to do and I recommend grabbing the depacker routines (from Metalbrain for Exomizer or T&J for BITBuster) and using them instead.

And insulting me is childish; try growing up, hey?
"I think you should worry less about who you might offend and care more about who you might inspire.”
— Mike Baxter

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #41 on: 21:44, 21 September 13 »
@Lou: SB can also process BASIC programs. So insdead of the LOAD command in the BASIC program, you use an RSX which calls the binary, which is also in the ROM.




Lets say the BASIC loader 'BAD' will load a binary like 'TASTE', then you put that binary 'TASTE' as RSX in the ROM and you change the BASIC loader from 'LOAD"TASTE" to !TASTE. Then put that new BASIC loader into the ROM.


Attached is an example.... (I had no time to test if it works...) ... doesn't work... maybe on 464??




Ok, checked it. The original does not work. Send me a working copy and you get the ROM.
« Last Edit: 22:12, 21 September 13 by TFM »
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #42 on: 22:40, 21 September 13 »
The problem is that the .BIN file that |SB spits out has a checksum error. That BASIC program that TFM gave you will correct the checksum problem, making the game work.

Try running any of my (or your) other .ROM/.BIN files through that "patcher" and I think you'll find they work. Any .ROM/.BIN file that works when you use T&J's ROM loader (from the 16k ROM compo thread)

As I wrote in the previous post, I did create a checksum (using TFM's BASIC program yes), and it didn't help. It removed the "* CHECKSUM ERROR *" message at boot, but still wouldn't run the game. Either just a Ready message or else a reset or another crash.

And as for Exomizer, you need the Z80 depacker, this is why TFM told you to use a CPC packer that autoruns. It's far easier to use than going through the assembly program... however, as I mentioned, it's pretty easy to do and I recommend grabbing the depacker routines (from Metalbrain for Exomizer or T&J for BITBuster) and using them instead.

Yes I get all that, but I can't even make it work on a simple BIN below 16kb, like e.g. Killer Gorilla. I'm not even using any compressing yet. Like e.g. Astro Attack, is a small file of 10kb. Creating the ROM is easy. Getting it to run is not. That's why your chatbox comment + first post looked like a "You suck - see *I* can do it", except you didn't really - until your 2nd post.
I'm surprised you feel insulted, unless you consider your own chatbox message insulting too. I thought we were just having fun.

@Lou: SB can also process BASIC programs. So insdead of the LOAD command in the BASIC program, you use an RSX which calls the binary, which is also in the ROM.

Lets say the BASIC loader 'BAD' will load a binary like 'TASTE', then you put that binary 'TASTE' as RSX in the ROM and you change the BASIC loader from 'LOAD"TASTE" to !TASTE. Then put that new BASIC loader into the ROM.

Aaah.... I didn't think it could handle BASIC programs! That means Radzone could theoretically be converted to a ROM. Well, it would have to be 2 ROMs then, right? One for the BASIC part and one for the machine code?

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.898
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3839
  • Likes Given: 392
Re: how to convert a dsk image to rom???
« Reply #43 on: 22:55, 21 September 13 »
Post the two BIN files and I will tell you why.

Bryce.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #44 on: 23:06, 21 September 13 »
Post the two BIN files and I will tell you why.

Well, attached is the TESTFILE.ROM that tastefulmrship attached, except I added the checksum using the BASIC program.
loading it at address &c000 and calling &c009 gives me a Ready signal.

You should know though, that so far it's all been on emulator. I haven't used the real hardware yet.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #45 on: 23:20, 21 September 13 »
Hi Mr.Lou


BASIC and BIN files can be put (compressed) in the same ROM.




Sadly I have to work 7 days a week, so I only have time during incubation breaks to look at it. But it's not forgotten.



TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.898
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3839
  • Likes Given: 392
Re: how to convert a dsk image to rom???
« Reply #46 on: 23:26, 21 September 13 »
Ok, there are two differences in the files (other than the checksum):

At address &01E1 your file has the value &82, the working file has &83.
The same at &0304, yours: &82, other &83.

What is this value and what sets it?

Bryce.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #47 on: 07:56, 22 September 13 »
Ok, there are two differences in the files (other than the checksum):

At address &01E1 your file has the value &82, the working file has &83.
The same at &0304, yours: &82, other &83.

What is this value and what sets it?

I have absolutely no idea. All I did with that file was to import it into a DSK, so I could run TFM's BASIC checksum-adder program on it, and then export it again.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1236
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #48 on: 19:00, 22 September 13 »
Ok, I've built a ROM from Octoate's instructions and it still isn't working. (Both .ROM file and .ASM attached)

When the GORILLA.ROM file is loaded ( LOAD"GORILLA.ROM",&C000 : CALL &C009 ) it works fine.
When the ROM is installed and you type |KG, the sprites are corrupt and it fails to play.

I've checked the data and when the game starts ( JP &4100 ), both create the same data in memory. (ie I've tried both methods and checked via the debugger in WinAPE).

What is the actual wrongness in this mess?
"I think you should worry less about who you might offend and care more about who you might inspire.”
— Mike Baxter

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.855
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1067
  • Likes Given: 2230
Re: how to convert a dsk image to rom???
« Reply #49 on: 19:35, 22 September 13 »
What is the actual wrongness in this mess?

....this is where I should not post something like: "I thought you said anyone can do it?", right? Right...  so I won't do that.  ;)

Welcome to the Twilight Zone btw.