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

0 Members and 1 Guest are viewing this topic.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1237
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #50 on: 19:56, 22 September 13 »
....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.  ;)

Maybe re-reading what I put might uncloud your blinkered judgement.
A quick recap, if I may?
Quote
@mr_lou; I've got Killer Gorilla packed and ready, but it's so simple to do I don't know wh you can't do it. I'm no CPCist and I can do it, anyone can do it!
Quote
I meant it's easy to pack and depack .bin files with Exomizer/BITBuster... anyone can do that! Fitting a 64k game into 16k/32k is the key!

Anyway...
I've just tried with ROLAND GOES DIGGING and it has exactly the same problem; works fine in BASIC, the sprite-routine fails miserably as a ROM.
"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 #51 on: 20:05, 22 September 13 »
Now now, don't be rude. That's distasteful.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: how to convert a dsk image to rom???
« Reply #52 on: 20:17, 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?

The Rom is still active when called inside within the Rom. When using call from basic the Rom is disabled. Two choices use mc start program or run code in ram that disables the Rom and calls 4100. I am guessing killer gorilla uses firmware. If it hit hardware direct it would disable Rom when changing mode.

The reason the sprites are corrupted is its reading from c000 but Rom is there, when it then writes that goes to the ram under the Rom.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: how to convert a dsk image to rom???
« Reply #53 on: 20:21, 22 September 13 »
....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.

I agree with Mr.Lou not everyone can make a Rom. For programmers it's fairly easy. For non programmers I would say it is restricted to single files which can be run direct and which fit into 16k.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline redbox

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.751
  • Country: gb
    • redbox
  • Liked: 326
  • Likes Given: 267
Re: how to convert a dsk image to rom???
« Reply #54 on: 20:24, 22 September 13 »
What is the actual wrongness in this mess?

I expect you're forgetting to page out the ROM before starting the game.

You need to jump to your own routine in RAM first and switch off the ROM.  So if you're calling &C009 this could JumP to &A000 and you'd do this:

Code: [Select]
org &a000

ld bc,&7f8d     ; disable ROMs
out (c),c                   

jp &4100        ; start game

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 #55 on: 20:50, 22 September 13 »
I agree with Mr.Lou not everyone can make a Rom. For programmers it's fairly easy. For non programmers I would say it is restricted to single files which can be run direct and which fit into 16k.


Ah no. It's easy. You just need an unprotected game:

- If you have a BASIC loader, replace all LOAD commands by RSX commands (corresponding binaries get this RSX name from SB).

- Use Exomizer for Crunching (nice step by step manual in the CPCWiki).

- Use SB to put it into a ROM (very easy[nb]If you don't speak German, then it's time to learn this wonderful descriptive language[/nb]). SB can process files up to 31 KB. So you will get any game up to 64 KB in ROM (crunched of course).

- Use a simple BASIC program to adapt the checksum

- Use ManageDSK to get ROM from DSK to emulator, if you don't have the real machine.
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 #56 on: 20:57, 22 September 13 »

Ah no. It's easy. You just need an unprotected game:

- If you have a BASIC loader, replace all LOAD commands by RSX commands (corresponding binaries get this RSX name from SB).

- Use Exomizer for Crunching (nice step by step manual in the CPCWiki).

- Use SB to put it into a ROM (very easy[nb]If you don't speak German, then it's time to learn this wonderful descriptive language[/nb]). SB can process files up to 31 KB. So you will get any game up to 64 KB in ROM (crunched of course).

- Use a simple BASIC program to adapt the checksum

- Use ManageDSK to get ROM from DSK to emulator, if you don't have the real machine.

Except that's not the full recipe.
After using Exomizer, you also have to assemble some decompressing code and compile it e.g. with pasmo, and somehow merge the compressed binary with that decompressing routine binary, before you can create a ROM from it.
And don't say that's easy. It's not. It involves calculating a lot of addresses, which is confusing for anyone who's not a coder. I didn't even manage to get the decompressing working, after spending a whole day on it. So I definitely won't define it as being easy.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1237
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #57 on: 20:57, 22 September 13 »
Ok, it works! Thanks to the programmers, this Irish pretender has finally done it!
-yay-



EDIT: However, mr_lou, once you've got the compression/decompression worked out, the rest is quite straight forward.
"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 #58 on: 21:01, 22 September 13 »
Ok, it works! Thanks to the programmers, this Irish pretender has finally done it!
-yay-

Congratz!!!

EDIT: However, mr_lou, once you've got the compression/decompression worked out, the rest is quite straight forward.

Hm, not when I tried. Before experimenting with Exomizer I tried a few games that didn't require compression. Didn't succeed in any of those either.
That's where Bryce said it was because a single byte from different. I have no clue why.

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 #59 on: 21:04, 22 September 13 »
Yes, it works now.

My preference is that nothing is displayed at boot though. Because considering all the games I plan on installing in ROM, I'll have a wall of text then.
I'm also picky enough to not want KG as the starting command. I'd want |GORILLA as starting command.

Let the mocking begin.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1237
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #60 on: 21:05, 22 September 13 »
Hm, not when I tried. Before experimenting with Exomizer I tried a few games that didn't require compression. Didn't succeed in any of those either.
That's where Bryce said it was because a single byte from different. I have no clue why.
Ok, post here which game that was and I'll try and see if my "code" (ie Octoate, redbox & arnoldemu's code) will be able to convert it to a ROM.

Quote
My preference is that nothing is displayed at boot though. Because considering all the games I plan on installing in ROM, I'll have a wall of text then.
I'm also picky enough to not want KG as the starting command. I'd want |GORILLA as starting command.

Fair enough. I'll change the parameters after I've had a quick ruby and post it once done. (Unless someone else has already done it in that time, of course)
« Last Edit: 21:33, 22 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 #61 on: 21:12, 22 September 13 »
Ok, post here which game that was and I'll try and see if my "code" (ie Octoate, redbox & arnoldemu's code) will be able to convert it to a ROM.

It was nothing in particular. Just whatever I could find that had a small filesize. Not a game I was interested in as such.

Fair enough. I'll change the parameters after I've had a quick ruby and post it once done. (Unless someone else has already done it in that time, of course)

Really? That's rather tasteful of you...  :)

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1237
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #62 on: 21:34, 22 September 13 »
Really? That's rather tasteful of you...  :)
It won't take a minute to do... done! ^_^



EDIT: And I've just "patched" the ROLAND GOES DIGGING ROM as well! Enjoy! ^_^
« Last Edit: 21:58, 22 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 #63 on: 22:42, 22 September 13 »
It won't take a minute to do... done! ^_^
EDIT: And I've just "patched" the ROLAND GOES DIGGING ROM as well! Enjoy! ^_^

Awesome! And the right start commands for both too. Thanks a lot. PM me your paypal for the 4 euros.  :)
Want to convert more? Let me know. 2 euro per game.
(afaik arnoldemu is also converting a few)

What about the plus version of Jet Set Willy? Possible?
ftp://ftp.nvg.ntnu.no/pub/cpc/games/arcade/jetsetwp.zip

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1237
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #64 on: 22:44, 22 September 13 »
Awesome! And the right start commands for both too. Thanks a lot. PM me your paypal for the 4 euros.  :)
Want to convert more? Let me know. 2 euro per game.
I forgot to mention |DIGGING for ROLAND GOES DIGGING.

No need for money; just donate any monies to CPCWiki instead.

Oh, here's |TRASHMAN if you're interested! ^_^
« Last Edit: 22:46, 22 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 #65 on: 22:47, 22 September 13 »
Awesome!
Someone add these to the ROM games list.  :)
ROM List - CPCWiki

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 #66 on: 23:04, 22 September 13 »
I took the liberty... ROM List - CPCWiki

Bryce.

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 837
  • Liked: 395
  • Likes Given: 69
Re: how to convert a dsk image to rom???
« Reply #67 on: 23:06, 22 September 13 »
What about the plus version of Jet Set Willy? Possible?
ftp://ftp.nvg.ntnu.no/pub/cpc/games/arcade/jetsetwp.zip

Doubt it, it's 128K and a lot of that is solid data. There's no fancy packing on it so it might compress a bit, but things like the level data were never designed to pack well (because they're already pretty tightly compressed to fit in ram).

Course if I had a programmable cartridge, I could just fudge out the odd bit of self-modifying code from the source, tweak the paging routines to fetch from ROM instead of RAM and make a genuine GX version. But then I do still have the source code! ;-)

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1237
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #68 on: 23:13, 22 September 13 »
@mr_lou; I noticed you gave ASTRO ATTACK a go... well, here's my attempt. |ASTRO does the honours! ^_^
"I think you should worry less about who you might offend and care more about who you might inspire.”
— Mike Baxter

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 #69 on: 23:24, 22 September 13 »
Also added to the ROM List page :)

Bryce.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.316
  • Country: 00
  • Semi-professional acceptance testing engineer!
    • Epyteor titles on CPC-Power
  • Liked: 1237
  • Likes Given: 1939
Re: how to convert a dsk image to rom???
« Reply #70 on: 23:49, 22 September 13 »
Someone asked for CLASSIC INVADERS... well, |INVADERS runs this one! ^_^



EDIT: Well, I think I'm done.
« Last Edit: 23:58, 22 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 #71 on: 08:34, 23 September 13 »
tastefulmrship is unstoppable now!

And ralferoo converted Fruity Frank! (attached here)


Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 967
  • Country: gb
  • Liked: 580
  • Likes Given: 221
Re: how to convert a dsk image to rom???
« Reply #72 on: 10:16, 23 September 13 »
I don't know about headers. But I do see that the file is 16.1kb rather than 16.0kb like the other roms...
How do I remove this bastard header git?
As you're using linux:
Code: [Select]
dd if=file_with_header.bin of=file_without_header.bin bs=128 skip=1

Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 967
  • Country: gb
  • Liked: 580
  • Likes Given: 221
Re: how to convert a dsk image to rom???
« Reply #73 on: 10:18, 23 September 13 »
And ralferoo converted Fruity Frank! (attached here)
It was a bit of a git as the BASIC loader sets up all the envelopes the game requires and every noise the game makes sounds awful if this isn't done (or if the system is reset after doing MC_BOOT_PROGRAM)...

Anyway, you can use |FF or |FRUITY.

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 #74 on: 10:29, 23 September 13 »
I mailed a list of games to arnoldemu. Don't know if he's had a chance to look at them yet. So don't want to post the list here before I've heard from him.
I've asked him to paste the list here, for the games he hasn't looked at yet.