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

0 Members and 2 Guests are viewing this topic.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.363
  • Country: 00
  • Liked: 1283
  • Likes Given: 2026
Re: how to convert a dsk image to rom???
« Reply #125 on: 22:33, 23 September 13 »
Bruce Lee <-- that's almost a must. How did we miss that so far?
Feck! How did I miss that one? NEXT ON MY LIST!
Well, that's one oversight corrected! ^_^ |BRUCELEE



However, here's |HOMERUNNER... a 6k game on a 16k ROM! Such an amazing waste of space! ^_^



EDIT: |GILLIGAN'S GOLD is next...
EDIT: |TAPPER follows it pretty quickly.
EDIT: I noticed an assembly window open... it was EgoTrip's LAB ESCAPE, half converted... now finished as a ROM! |LABESCAPE
« Last Edit: 00:18, 24 September 13 by tastefulmrship »

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 #126 on: 00:01, 24 September 13 »
But the Hex Editor only shows "DEFEND OR DI."....  where's the last E?
Seems to be the case with all ROMs. The last character of the name isn't there. What gives?

The first name entry in a jump list for a ROM is a bogus entry as the associated jump address is the initialisation routine for the ROM.  This name entry has therefore been commonly used as the "description" for the ROM but you only see this in programs such as ROM managers for the MegaFlash.

This entry usually (and is good practice) contains spaces so it can't be called from a RSX.  The last character is there but in a ROM name list you add &80 to the last character, so if you subtract this it will make sense.

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.318
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1031
  • Likes Given: 2473
Re: how to convert a dsk image to rom???
« Reply #127 on: 01:54, 24 September 13 »
Quote
EDIT: |TAPPER follows it pretty quickly.


Nchts! I thought you'd use |DRINK for that...  ;D

Offline MiguelSky

  • 464 Plus
  • *****
  • Posts: 379
  • Country: es
    • CPCGamesCD
  • Liked: 213
  • Likes Given: 417
Re: how to convert a dsk image to rom???
« Reply #128 on: 03:05, 24 September 13 »
Hi guys :)
I have some time without read any post here, I'm very busy last times... I read about this post in FB today. Here Amstrad CPC - Juegos en Rom - Amstrad CPC we spoke some years ago about putting games in rom. The cngsoft packed games collection cngsoft.no-ip.org is great to use with SoftBrenner to make rom games.

EDITO: Hmm, I see I have the CHECKSUM problem too, but I can't fix it !!
EDITO2: Changed files !! Now working :)
« Last Edit: 14:30, 24 September 13 by MiguelSky »

Online mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.092
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1261
  • Likes Given: 2507
Re: how to convert a dsk image to rom???
« Reply #129 on: 08:30, 24 September 13 »
EDITO: Hmm, I see I have the CHECKSUM problem too, but I can't fix it !!

This little BASIC program will fix it.

Code: [Select]
10 CLS:CAT
20 INPUT "ROM filename: ",n$
30 MEMORY &3FFF
40 PRINT "Loading ROM"
50 LOAD n$,&4000
60 PRINT "Calculating checksum"
70 w=0:FOR adr=&4000 TO &7FFE:w=w+PEEK(adr)
80 IF w>255 THEN w=w-256
90 IF adr MOD &200 = 0 THEN PRINT "=";
100 NEXT
110 PRINT
120 PRINT "Saving ROM"
130 POKE &7FFF,w
140 SAVE n$,b,&4000,&4000

Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 969
  • Country: gb
  • Liked: 583
  • Likes Given: 222
Re: how to convert a dsk image to rom???
« Reply #130 on: 11:13, 24 September 13 »
This little BASIC program will fix it.
I'm genuinely interested now. So, the "official" way of doing this is byte 0x3fff = sum(bytes 0 to 0x3ffe) ?

Because I actually thought that it was sum(bytes 0 to 0x3fff)=0. But in either case, out of my entire ROM collection, I have very, very few where this checksum matches.

Here's some quick and dirty python code:
Code: [Select]
#!/usr/bin/python
import os
import sys

for name in sys.argv[1:]:
    f=open(name,"rb")
    x=0
    s=0

    rom = f.read(16384)
    if len(rom)<16384:
        rom = rom + (chr(0) * (16384-len(rom)))
    for c in rom[0:16382]:
        b=ord(c)
        s=s+b
    c = ord(rom[16383])
    print "%-20s : sum %02X xsum %02X"%(name,s&0xff,c)

and running this over amy entire ROM collection:

Code: [Select]
/home/ralf/src/cpc/wincpc/roms/amsdos.rom : sum C2 xsum 1A
/home/ralf/src/cpc/wincpc/roms/basic464.rom : sum E5 xsum 54
/home/ralf/src/cpc/wincpc/roms/basic6128.rom : sum 62 xsum C9
/home/ralf/src/cpc/wincpc/roms/basic664.rom : sum 62 xsum C9
/home/ralf/src/cpc/wincpc/roms/bj1.rom : sum 42 xsum 00
/home/ralf/src/cpc/wincpc/roms/bj2.rom : sum AD xsum 00
/home/ralf/src/cpc/wincpc/roms/bj3.rom : sum 4B xsum 00
/home/ralf/src/cpc/wincpc/roms/Harrier.rom : sum 6D xsum 00
/home/ralf/src/cpc/wincpc/roms/hoh_01.rom : sum C6 xsum 00
/home/ralf/src/cpc/wincpc/roms/hoh_02.rom : sum E1 xsum 00
/home/ralf/src/cpc/wincpc/roms/hoh_03.rom : sum 78 xsum 00
/home/ralf/src/cpc/wincpc/roms/os464.rom : sum 00 xsum 00
/home/ralf/src/cpc/wincpc/roms/os6128.rom : sum 00 xsum 00
/home/ralf/src/cpc/wincpc/roms/os664.rom : sum 00 xsum 00
/home/ralf/src/cpc/wincpc/roms/Stk12-1.rom : sum C0 xsum 00
/home/ralf/src/cpc/wincpc/roms/Stk12-2.rom : sum 34 xsum 00
/home/ralf/src/cpc/wincpc/roms/Stk12Gen.rom : sum B2 xsum 00
/home/ralf/cpc/roms/AMSDOS.ROM : sum C2 xsum 1A
/home/ralf/cpc/roms/BASIC1-0.ROM : sum E5 xsum 54
/home/ralf/cpc/roms/BASIC_1.1.ROM : sum 62 xsum C9
/home/ralf/cpc/roms/COMPO_CH.ROM : sum B4 xsum B4
/home/ralf/cpc/roms/COMPO_OVERKOB.ROM : sum DD xsum 00
/home/ralf/cpc/roms/COMPO_PUZLO.ROM : sum 3E xsum FF
/home/ralf/cpc/roms/COMPO_RELENT.ROM : sum 9C xsum 00
/home/ralf/cpc/roms/DDEMON.ROM : sum 41 xsum 72
/home/ralf/cpc/roms/OS464.ROM : sum 00 xsum 00
/home/ralf/cpc/roms/OS_6128.ROM : sum 00 xsum 00
/home/ralf/cpc/roms/PARADOS.ROM : sum 26 xsum 00
/home/ralf/cpc/roms/ArnorBCPL.rom : sum 09 xsum 09
/home/ralf/cpc/roms/disc_micropower.rom : sum B9 xsum FF
/home/ralf/cpc/roms/discpowe.rom : sum 6D xsum FF
/home/ralf/cpc/roms/fract.rom : sum 37 xsum 00
/home/ralf/cpc/roms/sugarlumps.rom : sum 9B xsum 00
/home/ralf/src/arnold/arnold/src/roms/parados.rom : sum 26 xsum 00
/home/ralf/src/cpc/arnold_tng/src/roms/amsdose/amsdos.rom : sum C2 xsum 1A
/home/ralf/src/cpc/arnold_tng/src/roms/cpc464e/basic.rom : sum E5 xsum 54
/home/ralf/src/cpc/arnold_tng/src/roms/cpc464e/os.rom : sum 00 xsum 00
/home/ralf/src/cpc/arnold_tng/src/roms/cpc6128e/basic.rom : sum 62 xsum C9
/home/ralf/src/cpc/arnold_tng/src/roms/cpc6128e/os.rom : sum 00 xsum 00
/home/ralf/src/cpc/arnold_tng/src/roms/cpc6128s/basic.rom : sum 62 xsum C9
/home/ralf/src/cpc/arnold_tng/src/roms/cpc6128s/os.rom : sum 00 xsum 00
/home/ralf/src/cpc/arnold_tng/src/roms/cpc664e/basic.rom : sum 62 xsum C9
/home/ralf/src/cpc/arnold_tng/src/roms/cpc664e/os.rom : sum 00 xsum 00
/home/ralf/src/cpc/arnold_tng/src/roms/kcc/kccbas.rom : sum 62 xsum C9
/home/ralf/src/cpc/arnold_tng/src/roms/kcc/kccos.rom : sum AB xsum 00
/home/ralf/src/cpc/pace/x/COMSTAR1.ROM : sum 38 xsum FF
/home/ralf/src/cpc/pace/x/COMSTAR2.ROM : sum CD xsum FF
/home/ralf/src/cpc/pace/x/PACE232.ROM : sum 38 xsum FF
/home/ralf/src/cpc/pace/x/RS232101.ROM : sum 00 xsum 00

In fact, only Cyber Huhn, ArnorBCPL, one of the serial ROMs (see below) and the firmwares (which TFM claims shouldn't be checksummed anyway).

BTW, the serial RS232101.ROM checksum only computes if you pad the ROM to 16KB. It's actually only an 8KB ROM and the last few bytes are 0xFF so if you duplicate the ROM twice as you'd get on a real machine, the checksum doesn't match. But apparently, that's enough for TFM to brand me a liar.

So, my question: is this really a standard? Looks more like a coincidence to me. And there certainly seem to be enough exceptions to make this something not worth worrying about.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2271
  • Likes Given: 3478
Re: how to convert a dsk image to rom???
« Reply #131 on: 11:24, 24 September 13 »
So, my question: is this really a standard? Looks more like a coincidence to me. And there certainly seem to be enough exceptions to make this something not worth worrying about.
Standard: No.
Recommendation: Yes.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2271
  • Likes Given: 3478
Re: how to convert a dsk image to rom???
« Reply #132 on: 11:28, 24 September 13 »
Even when packed, both games exceed 24k in size, so it is possible if you use 2 ROMs.
It might be nice if someone could explain (in general terms) how to deal with 2 ROM images for one title.
I have attached my work in progress code to show how I am making 1 of the games that uses 2 roms.

The main rom has the rom name (I added (A) and (B) to distinguish the order to insert them).
The main rom also has the | command to execute it.

The | command copies pucrunch decruncher into ram, then decrunches one block which fits into the first 16k rom.
Then it calls the second rom using kl_rom_pchl (name??). This then decrunches the other blocks and returns back to the main rom where the game is launched with mc start program.

This is incomplete because I need to setup some envelopes.

But this is one way it can be done.

Other ways are:

- using | commands. This allows you to insert the roms as you wish and the | command is found and executed to complete the running of the program - TFM's suggestion
- using the ROM like a filing system and stretching the data across up to 4 roms. I'll do one of these later - probably for spindizzy.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline MiguelSky

  • 464 Plus
  • *****
  • Posts: 379
  • Country: es
    • CPCGamesCD
  • Liked: 213
  • Likes Given: 417
Re: how to convert a dsk image to rom???
« Reply #133 on: 14:32, 24 September 13 »
This little BASIC program will fix it.

Code: [Select]
10 CLS:CAT
20 INPUT "ROM filename: ",n$
30 MEMORY &3FFF
40 PRINT "Loading ROM"
50 LOAD n$,&4000
60 PRINT "Calculating checksum"
70 w=0:FOR adr=&4000 TO &7FFE:w=w+PEEK(adr)
80 IF w>255 THEN w=w-256
90 IF adr MOD &200 = 0 THEN PRINT "=";
100 NEXT
110 PRINT
120 PRINT "Saving ROM"
130 POKE &7FFF,w
140 SAVE n$,b,&4000,&4000
Thanks, mr_lou !! I was using the checksum.bas into the Classic Muncher dsk of the earlier posts. I edited the files in my message.
 
Anyway, I think the checksum doesn't need be fixed if you load the roms with SoftBrenner in real CPC.

Offline Axelay

  • 6128 Plus
  • ******
  • Posts: 579
  • Country: au
  • Liked: 375
  • Likes Given: 87
Re: how to convert a dsk image to rom???
« Reply #134 on: 15:55, 24 September 13 »
Wasn't there released an updated version of Dead on Time a while after the first release?
Or did I dream that? (I might have. Dead on Time was played a lot when it came out  ;) )



Oh sure, there was a bug fix release a month or so later.  But the version in the link on arnoldemu's post looks to be that version.


Oh, I did like a bit of Star Firebirds myself: |STARFIRE to start.


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: 1980
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #135 on: 20:34, 24 September 13 »
out of my entire ROM collection, I have very, very few where this checksum matches.


Sure because you check 100 times the BASIC or AmsDOS ROMs. Further some French stuff, where coder obviously haven't been acquainted to the checksum protocol.


Why don't you check regular commercial ROMs which have been sold back the day? 100% of them have the ckecksum, all using a similar algorithm.
 
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.363
  • Country: 00
  • Liked: 1283
  • Likes Given: 2026
Re: how to convert a dsk image to rom???
« Reply #136 on: 12:56, 25 September 13 »
I'm having a slight issue with (God's own) SULTAN'S MAZE and (the awesome) ATOM SMASHER.
How the living poo-poo do you RUN a BASIC program from a ROM?

I noticed that there's a thread about RUNning a BASIC program from assembly and the general consensus is that it's not possible.





EDIT: Just added Micro Power's |GHOULS to my list of ROM games. And seeing as this is my LAST DAY AT WORK (-yay-), I'll have a few days to catch up on the titles I wanted to do before venturing into multi-ROM territory.
EDIT: Ok, just to complete the Micro Power all-time Top 3 games of all time, here's |GAUNTLET for your enjoyment.
« Last Edit: 14:09, 25 September 13 by tastefulmrship »

Online mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.092
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1261
  • Likes Given: 2507
Re: how to convert a dsk image to rom???
« Reply #137 on: 12:59, 25 September 13 »
How the living poo-poo do you RUN a BASIC program from a ROM?

I used the Softbrenner utility to convert a simple BASIC program of my own into a ROM. Worked fine. (The only successful conversion I did).

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.654
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4180
  • Likes Given: 436
Re: how to convert a dsk image to rom???
« Reply #138 on: 15:22, 25 September 13 »
Woaw, slow down guys (Tastefulmrship), I can barely keep up! The ROM List page now offers a whopping 31 games! on 37 ROMs! That should keep your MegaFlash running hot for quite a while!

You can browse the entire list here: ROM List - CPCWiki

I had to add (Defender Clone) to Gauntlet's name to avoid people mixing it up with the U.S. Gold Gauntlet.

(Now if any of you can get the U.S. Gold Gauntlet onto ROM, I'll be seriously impressed :) )

Bryce.
« Last Edit: 15:26, 25 September 13 by Bryce »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2271
  • Likes Given: 3478
Re: how to convert a dsk image to rom???
« Reply #139 on: 15:31, 25 September 13 »
where is defend or die in that list??? ;)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Online mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.092
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1261
  • Likes Given: 2507
Re: how to convert a dsk image to rom???
« Reply #140 on: 15:37, 25 September 13 »
Woaw, slow down guys (Tastefulmrship), I can barely keep up!

Disregard that. Do not slow down. I repeat. Do not slow down. Just keep going as fast as you can.  :)

You can browse the entire list here: ROM List - CPCWiki

I had to add (Defender Clone) to Gauntlet's name to avoid people mixing it up with the U.S. Gold Gauntlet.

Awesome! Minor correction. The game "Star Fire" is really "Star Firebirds".

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.654
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4180
  • Likes Given: 436
Re: how to convert a dsk image to rom???
« Reply #141 on: 16:00, 25 September 13 »
Ok, I'll edit that. I anot only forgot Defend Or die, Space Mania is missing too :(

Edit: Star Firebird edited (release date and Author were still wrong), added Defend or Die and Space Mania. Now 33 Games on 39 ROMs!!

Bryce.
« Last Edit: 16:15, 25 September 13 by Bryce »

Offline Axelay

  • 6128 Plus
  • ******
  • Posts: 579
  • Country: au
  • Liked: 375
  • Likes Given: 87
Re: how to convert a dsk image to rom???
« Reply #142 on: 19:06, 25 September 13 »
I thought I might try and find a Dave Rogers tune in a game that fit on a single ROM.  |ANARCHY was small enough!  :)

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: 1980
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #143 on: 20:23, 25 September 13 »
I used the Softbrenner utility to convert a simple BASIC program of my own into a ROM. Worked fine. (The only successful conversion I did).


Maybe you should first make a disc version using compressed files. And then - if it works from disc - put it to the ROM.

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

Online mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.092
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1261
  • Likes Given: 2507
Re: how to convert a dsk image to rom???
« Reply #144 on: 20:39, 25 September 13 »
Maybe you should first make a disc version using compressed files. And then - if it works from disc - put it to the ROM.

I have given up.
History has shown that other people can make 100 ROM files for every 0 ROM I make.

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: 1980
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #145 on: 22:03, 25 September 13 »
Come on! Just give it a break for a while.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.363
  • Country: 00
  • Liked: 1283
  • Likes Given: 2026
Re: how to convert a dsk image to rom???
« Reply #146 on: 22:08, 25 September 13 »
Woaw, slow down guys (Tastefulmrship), I can barely keep up! The ROM List page now offers a whopping 31 games! on 37 ROMs! That should keep your MegaFlash running hot for quite a while!

Disregard that. Do not slow down. I repeat. Do not slow down. Just keep going as fast as you can.  :)


Well, I AM now unemployed... (for four days)... so I have plenty of time to go through most of 1984 and the beginning of 1985.
Tonight I have Spanish red wine to drink (@Vanity; please don't release a demo tonight ^_^), so I will make a new start in the morning!

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: 1980
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #147 on: 22:11, 25 September 13 »
Wine? YOU are Irish! So the heck DRINK BEER!!! AND WHISKY!!!  ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.363
  • Country: 00
  • Liked: 1283
  • Likes Given: 2026
Re: how to convert a dsk image to rom???
« Reply #148 on: 22:18, 25 September 13 »
Wine? YOU are Irish! So the heck DRINK BEER!!! AND WHISKY!!!  ;)
Well, normally I'd prefer a pint of the BLACK STUFF and a smooth JAMESON chaser... but beggars can't be choosers.

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: 1980
  • Likes Given: 4650
Re: how to convert a dsk image to rom???
« Reply #149 on: 22:33, 25 September 13 »
Well, time to draw the games money  ;)  Jameson is big in NOLA too.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus