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

0 Members and 1 Guest are viewing this topic.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.335
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2264
  • Likes Given: 3478
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #325 on: 22:46, 27 May 14 »
The "Firmware Guide" claims &b8da->&b8f8 hold the IY value for each ROM. There is space here in CPC6128 for 16 roms, 8 for 464.

What happens in firmware 3.1 where it supports more or in the rom that extends the range up to 32?

Also where is the rom chaining information stored (rom select + next rom in list)???

So where exactly is the information stored. I am guessing because if it's in a fixed size buffer it may be running out.

I think this may be why mr_lou is seeing problems?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

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: 1979
  • Likes Given: 4650
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #326 on: 22:51, 27 May 14 »
Maybe. on the other hand once I had 27 ROMs installed without a problem.

Problems usually make Utopia and different DOS ROMs at the same time. Also the AlphaROM is not compatible to everything.

The Games competition ROMs seem all to work fine. If I have some time (during the next month), I'll take a look at it.

@Mr_Lou: Can you provide a screen dump or list of ROMs which cause problems? So the error could be reproduced.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline redbox

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.751
  • Country: gb
    • redbox
  • Liked: 326
  • Likes Given: 267
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #327 on: 23:23, 27 May 14 »
What happens in firmware 3.1 where it supports more or in the rom that extends the range up to 32?

Nothing happens, the buffer is the same size as the original OS AFAIK.  Same with my MegaFlash version of the Plus cartridge.

So I think you may well be onto something here...

Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 969
  • Country: gb
  • Liked: 583
  • Likes Given: 222
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #328 on: 23:42, 27 May 14 »
Also where is the rom chaining information stored (rom select + next rom in list) ???
In (#b8d3) (6128), there is a pointer to the most recent RSX block registered.
The first two bytes are the address of the next RSX block, the second two bytes are the "RSX address".
If the RSX address has a zero high-byte, it is a ROM RSX table and the low-byte is the ROM select byte and the table is at #c004. Otherwise, it's a RAM RSX table.

This is exactly what the 4 bytes that gets used per ROM is for.

The "Firmware Guide" claims &b8da->&b8f8 hold the IY value for each ROM. There is space here in CPC6128 for 16 roms, 8 for 464.
What happens in firmware 3.1 where it supports more or in the rom that extends the range up to 32?
So where exactly is the information stored. I am guessing because if it's in a fixed size buffer it may be running out.

You're totally correct, there does appear to have a fixed size block for the  IY table for each ROM:
Code: [Select]
034c 23        inc     hl
034d eb        ex      de,hl
034e 21dab8    ld      hl,$b8da        ; the ROM table
0351 ed4bd6b8  ld      bc,($b8d6)    ; the currently active ROM (as we're probing them all in sequence this will be set)
0355 0600      ld      b,$00
0357 09        add     hl,bc
0358 09        add     hl,bc          ; #B8DA + 2*(#B8D6)
0359 73        ld      (hl),e
035a 23        inc     hl
035b 72        ld      (hl),d          ; store IY (which is HL+1 as returned from the ROM)
035c 21fcff    ld      hl,$fffc
035f 19        add     hl,de          ; reserve the 4 bytes for the RSX chain
0360 cda002    call    $02a0                    ; KL LOG EXT

Also, this supports the theory of the fixed-size:
Code: [Select]
;; rom select below 16 (max for firmware 1.1)?
048c fe10      cp      $10         
048e 300f      jr      nc,$049f   

;; 16-bit table at &b8da
0490 87        add     a,a
0491 c6da      add     a,$da
0493 6f        ld      l,a
0494 ceb8      adc     a,$b8
0496 95        sub     l
0497 67        ld      h,a

So, in summary, I'd say if someone is using the standard firmware, there should be no issue. With a modified firmware to accept more than 16 ROMs, this table will need to be moved somewhere else. I'd suggest the following additional patches (untested though):

Code: [Select]
0089 21ffab    ld      hl,$abff      ; decrease this by number of ROMs, so 32 -> #abdf
...
034e 21dab8    ld      hl,$b8da      ; change to #abe0 for 32 ROMs
...
0491 c6da      add     a,$da         ; change to #e0 for 32 ROMS
0493 6f        ld      l,a
0494 ceb8      adc     a,$b8         ; change to #ab

So,
Code: [Select]
008a df
008b ae
034f e0
0350 ab
0492 e0
0495 ab

This should work reliably as nothing else uses these table, but at the expense of another 64 bytes of RAM...
« Last Edit: 23:49, 27 May 14 by ralferoo »

Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 969
  • Country: gb
  • Liked: 583
  • Likes Given: 222
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #329 on: 23:52, 27 May 14 »
Maybe. on the other hand once I had 27 ROMs installed without a problem.
This table will only be updated for background ROMs (i.e. with RSXes). Foreground ROMs take over the system and so don't need the IY value and extension ROMs aren't scanned at all.

So, if you only put extension ROMs in the top 16 slots, you'd not experience any corruption.

Offline redbox

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.751
  • Country: gb
    • redbox
  • Liked: 326
  • Likes Given: 267
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #330 on: 00:53, 28 May 14 »
So, in summary, I'd say if someone is using the standard firmware, there should be no issue. With a modified firmware to accept more than 16 ROMs, this table will need to be moved somewhere else. I'd suggest the following additional patches (untested though):

Excellent work, I shall test with my DIY Plus Cartridge as soon as I get a chance.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.066
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1228
  • Likes Given: 2467
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #331 on: 08:08, 28 May 14 »
@Mr_Lou: Can you provide a screen dump or list of ROMs which cause problems? So the error could be reproduced.

When I find the time, I will try from scratch, installing one game at a time, and testing all games after each installation, and describe everything, and then attach a zip with the ROM files I used.
But this socalled adult life is a real time waster. You have to do boring stuff like work and such, so it'll be a while before I have the time.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.352
  • Country: 00
  • Liked: 1277
  • Likes Given: 2019
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #332 on: 10:27, 28 May 14 »
My, my... this is turning into an interesting thread.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.335
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2264
  • Likes Given: 3478
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #333 on: 11:18, 28 May 14 »
This table will only be updated for background ROMs (i.e. with RSXes). Foreground ROMs take over the system and so don't need the IY value and extension ROMs aren't scanned at all.

So, if you only put extension ROMs in the top 16 slots, you'd not experience any corruption.
I also believe that extension roms will not be registered here.

Question:

The "booster" rom uses the standard firmware. So does the booster rom allocate some memory to fit the additional information in, or if used with a standard OS does it also cause problems?
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: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #334 on: 11:22, 28 May 14 »
The "booster" rom uses the standard firmware. So does the booster rom allocate some memory to fit the additional information in, or if used with a standard OS does it also cause problems?

The Booster ROM just patches the firmware (by patching the jump lock).  It's a very simple patch and doesn't patch the RST routine in the OS ROM which is what leads to it's instability.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.335
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2264
  • Likes Given: 3478
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #335 on: 15:06, 28 May 14 »
The Booster ROM just patches the firmware (by patching the jump lock).  It's a very simple patch and doesn't patch the RST routine in the OS ROM which is what leads to it's instability.
So it allows the firmware to register roms above 16, it'll then try and do that and corrupt memory.
Nice. I think there is some space in there anyway, so you'd get away with a bit.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

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: 1979
  • Likes Given: 4650
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #336 on: 18:39, 28 May 14 »
...But this so called adult life is a real time waster. You have to do boring stuff like work and such, so it'll be a while before I have the time.


Tell me about it  :laugh:  Never mind, as soon as you're ready I'll take a look at it.  :)
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.352
  • Country: 00
  • Liked: 1277
  • Likes Given: 2019
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #337 on: 16:38, 01 June 14 »
(Obvious trolls are obvious)

Starting the FreeScape 3D collection we have |DARKSIDE and |DRILLER. Both of which happily fit in 2 ROMs per game... the other FreeScape 3D titles (CASTLE MASTER, THE CRYPT, TOTAL ECLIPSE, TOTAL ECLIPSE TRAINER, SPHINX JINX and the 3D INTRODUCTION GAME) are a little more irritating and will require 3 ROMs to house them... I'll do that whenever I get time!

EDIT: Someone mentioned Melvyn Wright in a thread a few months back, and that prompted me to convert a few of the Firebird music-load games (from existing hacks). First on my list was the brilliant, but feck-off hard, |DRUID... complete with loading music!

EDIT: Slight leftfield turn now; Arkos & Overlander's |DTC demo. Wobbler meets plasma meets scroller to ZX music... followed by ruptured logo to the Spitting Images theme tune (AY'd by David Whittaker for the game of the same name).

EDIT: Finally, ROMANTIC ROBOT's mega-huge maze race; |WRIGGLERRR. The name has two extra Rs in it as there is already a WRIGGLER ROM in the collection and this will prevent any issues if both games are installed.




« Last Edit: 16:49, 01 June 14 by Jonah (Tasteful Mr) Ship »

Offline dcdrac

  • 6128 Plus
  • ******
  • Posts: 923
  • Liked: 205
  • Likes Given: 24
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #338 on: 17:03, 01 June 14 »
will these roms work in the new Xmem and if so how doi transfer them?

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.124
  • Country: br
  • Liked: 1106
  • Likes Given: 1864
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #339 on: 18:36, 01 June 14 »
will these roms work in the new Xmem and if so how doi transfer them?
Of course, X-Mem brings the firmware 3.14, that was fixed along time ago. In our case we use the range $BE00-$BE3F  for storage the new pointer table.

With respect to transfer, use your favourite way, using a minibooster or put the roms in a 3" 1/2 or 3" disk, etc...

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.706
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3247
  • Likes Given: 5908
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #340 on: 21:16, 01 June 14 »
Freescape in ROM? Niiiiiiiice!

Offline redbox

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.751
  • Country: gb
    • redbox
  • Liked: 326
  • Likes Given: 267
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #341 on: 22:30, 01 June 14 »
Firmware 3.14, that was fixed along time ago. In our case we use the range $BE00-$BE3F  for storage the new pointer table.

I must have missed this... do you have a download link?

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.284
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1172
  • Likes Given: 80
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #342 on: 02:30, 02 June 14 »
The Freescape games from ROM are great, thanks.


On a separate note has anyone managed to get the ROM version of Head over Heals to actually run?


I get a screen of garbage on both my 6128plus and Schneider CPC 6128.


On WinAPE it hangs and on JavaCPC it triggers a reset.


I have downloaded the file many many times and copied the rom images to the Symbiface via the HxC and by pulling the HDD the result is always the same, and only with these roms.


Do these ROMS have specific slots, in which case what are they ;) or are they just fubar :( or have I lost the plot, and this is a sign that I should have 1 more go on Driller, Harvey Headbanger or Chuckie Egg.


Kind Regards


Craig
IRC:  #Retro4All on Freenode

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.284
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1172
  • Likes Given: 80
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #343 on: 02:32, 02 June 14 »
I must have missed this... do you have a download link?


As I understand it is not generally available yet, and requires a X-Mem.


Hopefully soon :)


Regards


Craig
IRC:  #Retro4All on Freenode

Offline IanS

  • CPC6128
  • ****
  • Posts: 196
  • Country: gb
    • index.php?action=treasury
  • Liked: 49
  • Likes Given: 42
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #344 on: 02:52, 02 June 14 »

On a separate note has anyone managed to get the ROM version of Head over Heals to actually run?


I get a screen of garbage on both my 6128plus and Schneider CPC 6128.
The head over heels roms are expecting the roms to be in position 9,16 and 17.
If you want to relocate them, you need to modify bytes &c05b (rom 1), &c06b (rom 2) & &c07b (rom 3) of rom 1.

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.284
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1172
  • Likes Given: 80
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #345 on: 03:27, 02 June 14 »
The head over heels roms are expecting the roms to be in position 9,16 and 17.
If you want to relocate them, you need to modify bytes &c05b (rom 1), &c06b (rom 2) & &c07b (rom 3) of rom 1.

Perfect, thanks. Guess what I'll be doing tomorrow
IRC:  #Retro4All on Freenode

Offline MiguelSky

  • 464 Plus
  • *****
  • Posts: 376
  • Country: es
    • CPCGamesCD
  • Liked: 211
  • Likes Given: 407
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #346 on: 03:49, 02 June 14 »
the other FreeScape 3D titles (CASTLE MASTER, THE CRYPT, TOTAL ECLIPSE, TOTAL ECLIPSE TRAINER, SPHINX JINX and the 3D INTRODUCTION GAME)
Don't forget Ciudadela Fantasma and A Chance in Hell !!  ;)
« Last Edit: 03:50, 02 June 14 by MiguelSky »

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1015
  • Likes Given: 926
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #347 on: 15:18, 02 June 14 »
The head over heels roms are expecting the roms to be in position 9,16 and 17.
If you want to relocate them, you need to modify bytes &c05b (rom 1), &c06b (rom 2) & &c07b (rom 3) of rom 1.

Confirmed:
 [ Invalid Attachment ]

Thankyou for this information, as there was no readme included...
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.124
  • Country: br
  • Liked: 1106
  • Likes Given: 1864
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #348 on: 15:33, 02 June 14 »

As I understand it is not generally available yet, and requires a X-Mem.


Hopefully soon :)
That must be an urban legend :P, you can download it from the X-Mem page, everything is available there... aside the ungrateful nazi pirates and spanerds buccaneers clonning Bryce, Pulkomandy, TotO and any interesting new boards.

With respect to the HoH roms, it was one of the first roms, with Bombjack, that i made for the Megaflash and by then, before the lower rom expansions era :P, the idea was put all the extra weight in rom numbers >15 as FutureOS always did and TFM always recommend :)

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.124
  • Country: br
  • Liked: 1106
  • Likes Given: 1864
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #349 on: 15:40, 02 June 14 »
Thankyou for this information, as there was no readme included...
No readme?  :P

And the Bomb Jack readme, just in case ;D