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 1 Guest are viewing this topic.

tastefulmrship

#125
Quote from: mr_lou on 20:15, 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

redbox

Quote from: mr_lou on 15:28, 23 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.

robcfg

QuoteEDIT: |TAPPER follows it pretty quickly.


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

MiguelSky

#128
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 :)

mr_lou

Quote from: MiguelSky on 01:05, 24 September 13EDITO: Hmm, I see I have the CHECKSUM problem too, but I can't fix it !!

This little BASIC program will fix it.


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

ralferoo

Quote from: mr_lou on 06:30, 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:

#!/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:


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

arnoldemu

Quote from: ralferoo on 09:13, 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

arnoldemu

Quote from: tastefulmrship on 14:12, 23 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

MiguelSky

Quote from: mr_lou on 06:30, 24 September 13
This little BASIC program will fix it.


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.

Axelay

Quote from: mr_lou on 12:34, 23 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.


TFM

Quote from: ralferoo on 09:13, 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

tastefulmrship

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

mr_lou

Quote from: tastefulmrship on 10:56, 25 September 13How 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).

Bryce

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

arnoldemu

where is defend or die in that list??? ;)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

mr_lou

Quote from: Bryce on 13:22, 25 September 13Woaw, 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.  :)

Quote from: Bryce on 13:22, 25 September 13You 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".

Bryce

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

Axelay

I thought I might try and find a Dave Rogers tune in a game that fit on a single ROM.  |ANARCHY was small enough!  :)

TFM

Quote from: mr_lou on 10:59, 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

mr_lou

Quote from: TFM on 18:23, 25 September 13Maybe 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.

TFM

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

tastefulmrship

Quote from: Bryce on 13: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!

Quote from: mr_lou on 13:37, 25 September 13
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!

TFM

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

tastefulmrship

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

TFM

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

Powered by SMFPacks Menu Editor Mod