News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Converting a game to ROM - and LOTS of ROM files inside!

Started by FRAGKI-2012, 00:30, 28 March 13

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

TFM

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

mr_lou

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?

mr_lou

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?

mr_lou

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?  ::)


TFM

Quote from: mr_lou on 19:49, 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

mr_lou

Quote from: TFM on 20:52, 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.

TFM

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

mr_lou

Quote from: TFM on 20:52, 20 September 13- When adding an RSX with SB, enable the autostart feature.

That doesn't seem to change anything...

Quote from: TFM on 21:18, 20 September 13
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

TFM

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

mr_lou

Quote from: TFM on 22:25, 20 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

Quote from: TFM on 22:25, 20 September 13Can 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?

mr_lou

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?

tastefulmrship

#36
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)

mr_lou

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

tastefulmrship

#38
Fair enough! I'll leave you to it, then.

mr_lou

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.

tastefulmrship

Quote from: mr_lou on 17:55, 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)

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?

TFM

#41
@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.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

mr_lou

Quote from: tastefulmrship on 19:10, 21 September 13The 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.

Quote from: tastefulmrship on 19:10, 21 September 13And 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.

Quote from: TFM on 19: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.

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?

Bryce

Post the two BIN files and I will tell you why.

Bryce.

mr_lou

Quote from: Bryce on 20:55, 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.

TFM

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

Bryce

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.

mr_lou

Quote from: Bryce on 21: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?

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.

tastefulmrship

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?

mr_lou

Quote from: tastefulmrship on 17:00, 22 September 13What 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.

Powered by SMFPacks Menu Editor Mod