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

0 Members and 1 Guest are viewing this topic.

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 #400 on: 20:11, 11 June 14 »
Well, in the moment you received a valid game rom number to launch, you are free to use the RAM as you like, because games are going to do that too.

But there in lies the problem, finding a piece of RAM that every game etc doesn't use...

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 #401 on: 20:34, 11 June 14 »
But there in lies the problem, finding a piece of RAM that every game etc doesn't use...
For the 99% of CPC games, putting your code around the stack ($BE00-$BFFF) should be enough.

But if you prefer we can do the logical thing and define an extra parameter in the rom, a pointer to a free zone (the pointer to the stack used by the game) with enough bytes for your game launcher routine. And then your code only would need to use JRs or add a routine for relocate your code in the final destination.

Offline Axelay

  • 6128 Plus
  • ******
  • Posts: 577
  • Country: au
  • Liked: 371
  • Likes Given: 85
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #402 on: 12:37, 12 June 14 »
For the 99% of CPC games, putting your code around the stack ($BE00-$BFFF) should be enough.



Hmm, are you sure that's good enough?  Only I expect at one time 99% of CPCs had their DOS at ROM 7 too.  ;)


But if you prefer we can do the logical thing and define an extra parameter in the rom, a pointer to a free zone (the pointer to the stack used by the game) with enough bytes for your game launcher routine. And then your code only would need to use JRs or add a routine for relocate your code in the final destination.


I think something like that would be a must.  Maybe the boot ROM could pass the positions of the additional ROMs to the game ROMs loader as well.

Offline Tai

  • CPC464
  • **
  • Posts: 27
  • Country: 00
  • Liked: 15
  • Likes Given: 106
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #403 on: 15:03, 12 June 14 »
IMHO, the ROMLoader program should do the following tasks:
  • Search for loader game ROMs in all slots
  • Show a screen or list found games
  • Wait for user to select a game or accept command to select a game
  • Create a memory structure with info of the selected game (see below). The main ROM of the selected game will use this structure to know in which slots are the rest of the game data.
  • Pass control to main ROM of selected game.
One posible option for the data structure:
Code: [Select]

; ROM 0 --> main game ROM
; ROM 1 --> first adtional ROM
; ROM 2 --> second adtional ROM
; ROM n --> nth aditional ROM


   org   &8000      ;address of data structure


   defb   n      ;number of aditional ROMs
   defb   slot_ROM1   ;ROM slot for ROM1
   defb   slot_ROM2   ;ROM slot for ROM2
   ...
   defb   slot_ROMn   ;ROM slot for ROMn


Each game has its own loading process (different addresses, different compressors, etc.)
With this aproach for any new game ROM there is no need to modify the ROMLoader (much easier to maintain and it leaves the task of copying/reallocate/decrunching data to the game ROM creator).
« Last Edit: 16:13, 12 June 14 by Tai »

Offline gdiazlo

  • Speccy
  • *
  • Posts: 1
  • Liked: 0
  • Likes Given: 1
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #404 on: 15:05, 12 June 14 »
I agree, the current approach seems a bit like an overengineering something that should load games from rom.

regards,


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 #405 on: 15:27, 12 June 14 »
Why do you need a routine in RAM?

I think you can do it all from ROM with the firmware.

It has functions to read a byte from a rom and give it back to you.
Yes it would be a little bit slower but doesn't need ram and therefore would allow more roms to be installed.

Also I think you should scan all 255 roms, this will allow 2mb/4mb rom expansions to be used.

I like your idea but at this time I can't see how you can do multiple part roms.

To do a multiple part rom that can be in any position, you need to have
1) Which rom part is it.
2) which roms qualify for the other parts.

The number of other roms is good for verifying you have installed all of them.

2) is determined from the rom name. Each rom has the same rom name, with different part number.


So if you can determine which roms hold which data then you can pass this to the init function of your first game rom.

e.g. iy points like this:

01 08 09

and then your rom can handle this information to read/write the data as it needs or to install itself.
« Last Edit: 15:29, 12 June 14 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

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 #406 on: 15:29, 12 June 14 »
Each game has its own loading process (differente addresses, different compressors, etc.)
With this aproach for any new ROM game there is no need to modify the ROMLoader (much easier to maintain and it leaves the task of copying/reallocate/decrunching data to the ROM Game creator).
I agree.

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

Offline Tai

  • CPC464
  • **
  • Posts: 27
  • Country: 00
  • Liked: 15
  • Likes Given: 106
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #407 on: 16:07, 12 June 14 »
Why do you need a routine in RAM?

I think you can do it all from ROM with the firmware.

It has functions to read a byte from a rom and give it back to you.
Yes it would be a little bit slower but doesn't need ram and therefore would allow more roms to be installed.

Also I think you should scan all 255 roms, this will allow 2mb/4mb rom expansions to be used.

I like your idea but at this time I can't see how you can do multiple part roms.

To do a multiple part rom that can be in any position, you need to have
1) Which rom part is it.
2) which roms qualify for the other parts.

The number of other roms is good for verifying you have installed all of them.

2) is determined from the rom name. Each rom has the same rom name, with different part number.


So if you can determine which roms hold which data then you can pass this to the init function of your first game rom.

e.g. iy points like this:

01 08 09

and then your rom can handle this information to read/write the data as it needs or to install itself.


The structure in RAM is generated by the ROM Loader with info of the ROM slots used by the selected game.
The main ROM of the selected game can use this structure to know in which slots are the rest of the game data instead of searching for it (already done by ROMLoader).
« Last Edit: 17:19, 12 June 14 by Tai »

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 #408 on: 20:25, 12 June 14 »
Hmm, are you sure that's good enough?  Only I expect at one time 99% of CPCs had their DOS at ROM 7 too.  ;)
Yes, and that was the reason for sending you that fix for running Edge Grinder in my machine, jejeje  ;)

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 #409 on: 21:58, 12 June 14 »
I copied it to RAM because the decompression routine needs a buffer.

And the 'over engineering' is because then we only need 1 copy of each decompressor, runtime routine etc. and the extension ROMs can almost be pure data.

But I can see the benefit of doing it the other way - I was just attempting to try and get something running that I'd half developed over 2 years ago...!

Offline Tai

  • CPC464
  • **
  • Posts: 27
  • Country: 00
  • Liked: 15
  • Likes Given: 106
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #410 on: 00:11, 13 June 14 »
Using the other approach the ROMLoader could copy the decompressor routine to RAM before passing control to game ROM. The game ROM could reallocate the decompressor routine if needed.
In addition, the game ROM header could use 1 byte as compressor ID (e.g., &00 - appack, &01 - exomizer, &02 - bitbuster, etc).

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 #411 on: 00:19, 13 June 14 »
Which is exactly what I have been doing (see previous header code I posted)...

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 #412 on: 13:17, 17 June 14 »
Would it be possible to convert Freddy Hardest 2nd side?
I am still working on a simple method of converting both parts of FREDDY HARDEST to 3 ROMs... the other option is having each part on 2 ROMs, but I thought that was a little wasteful of ROM slots!

However, in the meantime, here's |MAGMAX on 2 ROMs with a recoloured C64 title screen.

EDIT: Also, here's THING ON A |SPRING in 2 ROMs... with a special little surprise for true fans of the game! ^_^

EDIT: Did you ever play the irritatingly hard |PINGPONG? Well, now you can on 1 ROM! (This is getting fun, again!)

EDIT: Xyphoe recently posted his "Must Own/Play Top 10" video and one of them was |WEREWOLVES OF LONDON; a game I had never played until the CPC+ mock-up screens were posted a year or so back. Anyway, here it is on 2 ROMs, so everyone can enjoy it without messing around with those messy discs or tapes. Messy!

EDIT: Finally, for this post, here's Amstrad Cent Pour Cent's |MOLECULARR on 1 ROM and |MOLECULARR2 on 2 ROMs. Some French textstuff on the second game, but even with my low-level understanding of French, I can work out what's going on... so you guys should have no trouble!



« Last Edit: 10:00, 21 June 14 by Jonah (Tasteful Mr) Ship »

Offline Nilquader

  • CPC664
  • ***
  • Posts: 81
  • Country: de
  • (void**)NULL
  • Liked: 53
  • Likes Given: 4
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #413 on: 14:19, 20 June 14 »
Hi,

I've programmed a game launcher ROM, this one lets you start your games menu-based. Great for the kids (or even the parents). Despite the name, that piece of software does not only work on the Megaflash but on every ROM board with at lease 32 slots, for example the Symbiface II.

The programm launches the first RSX command in every ROM, so it works best with single-game roms. All ROMs that are below the menu ROM are not listed, so you can have your MAXAM, PROTEXT and ROMAN in slot 1-3, the menu in slot 4 and all your games in the slots above. Of course, ROM 7 won't be listed in any case. (That's probably not a game). You can start your games ion ROM 16-31, even without booster. These slots will be an ideal place for your games, because they won't be initialized so they don't need any RAM.

You can quit the menu by pressing ESC twice or the reset button. Download your MegaFlash Quickstart ROM there:

ftp://ftp.cpcszene.de/pub/Computer/Amstrad_CPC/ROM/MegaFlash%20Quickstart

Almost all game ROMs are copmpatible. I've tested a few, some from the Wiki and some that I've converted myself. I have a list of working games here:

ftp://ftp.cpcszene.de/pub/Computer/Amstrad_CPC/ROM/Games/MFQS%20compatible

Have fun!
Nilquader
« Last Edit: 18:25, 20 June 14 by Nilquader »
--
Nilquader of SPRING
http://www.nilquader.net/

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 #414 on: 16:37, 20 June 14 »
That's really nice! I wouldn't call it a menu, but it's very useful indeed, and the implementation (only showing ROMs above itself) is very clever. Thanks!!!

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 #415 on: 10:50, 05 July 14 »
Next batch of game ROMs... some of them have been requests from people. Here they are:

Firstly, here's |ANGLEBALL by Mastertronic on 1 ROM.
Then, PROJECT FUTURE on 2 ROMs, use |PFUTURE to load and play.
Next we have the insanely addictive |TRAFFIC on 1 ROM.
No game list can be complete without a |BINKY clone or two... this one on 1 ROM!
The nice looking (for 1985), but impossible to play |KRISTAL on 1 ROM.
Next is |BUBBLEGHOST on 2 ROMs; a nice game, but seriously hard.
Finally, the UK version of |ALIENS on 2 ROMs.




« Last Edit: 10:56, 05 July 14 by Jonah (Tasteful Mr) Ship »

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 #416 on: 10:58, 05 July 14 »
Wow man, since I got two new RAM/ROM boards just a couple of days ago (not X-MEM, I will post about it!), these will be great for testing purposes. Don't you ever stop? Hope not!!!

Btw, anyone keeping track of the ROM table on the wiki ( @Bryce ??)? Is it complete up to this batch or should I go back and fill them in?

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.614
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4159
  • Likes Given: 433
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #417 on: 17:34, 05 July 14 »
Nope, I haven't uploaded any of the ROMs on this page of the thread.

Gesendet von meinem Motorola DynaTEC 8000X mit Tapatalk 2.


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 #418 on: 18:38, 05 July 14 »
@Gryzor; If you give me access to edit the page, then I'm MORE than happy to update the ROMs page myself with all the BAR commands required to run the games converted with Axelay, robcfg and Octoate's ROM build code!

EDIT: Yes, none of the games that I have converted were done by me alone; mucho respects should ALWAYS go to those who showed me the way!

EDIT: I have a VERY large number of requests from people who do not want to to post on this thread, but would like ROM games from the CPC database... numbers that I cannot even cope with! I would like to convert EVERY single one, but this will take me AGES! Access to the ROM page on the Wiki will make that a lot easier... these people are not interested in this thread... just the ROM files involved!
« Last Edit: 19:35, 05 July 14 by Jonah (Tasteful Mr) Ship »

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 #419 on: 19:35, 05 July 14 »
@Bryce : "this page" depends on how many posts per page you have set it to show... never mind, I'll take it backwards :)

@Jonah (Tasteful Mr) Ship : not sure what you mean by "give me access"? If you have an account on the wiki you can edit it here. I can make an account for you if you fee bored :)

PS Damn, I want me a Dynatac 8000!

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 #420 on: 19:42, 05 July 14 »
@Jonah (Tasteful Mr) Ship : not sure what you mean by "give me access"? If you have an account on the wiki you can edit it here. I can make an account for you if you fee bored :)
I have tried to edit the ROM page and have had no joy, it has said that I need access to edit the page... Personally, I would perfer that the page had the BAR command rather than "converted to ROM by tastefulmrship". I am happy to do this for those I have converted, but I need the access rights to do so!

EDIT: @Gryzor; Every time I have tried to update the page it has given me the "you do not have access to edit this page" screen... however, with the link you gave I can access the editor for this page! Maybe I will use this in future to update the ROM page! Thanks muchly! ^_^
« Last Edit: 19:47, 05 July 14 by Jonah (Tasteful Mr) Ship »

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 #421 on: 19:50, 05 July 14 »
This doesn't make much sense! All I did was to click on "Edit" above the ROM table and copy the link from there, how exactly were you trying to edit it?

The bar commands is a great suggestion; I'd say an extra column would be the best solution, there's still enough space so we don't have to choose :)

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 #422 on: 20:11, 05 July 14 »
This doesn't make much sense! All I did was to click on "Edit" above the ROM table and copy the link from there, how exactly were you trying to edit it?
Every time I have tried to edit the page it has told me that I do not have EDIT rights to update the page;  you have given me the link to the EXACT right page I need to update the ROM page to my specs (ie the BAR command). Thanks for that!

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.614
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4159
  • Likes Given: 433
Re: Converting a game to ROM - and LOTS of ROM files inside!
« Reply #423 on: 20:30, 05 July 14 »
@Bryce : "this page" depends on how many posts per page you have set it to show... never mind, I'll take it backwards :)

@Jonah (Tasteful Mr) Ship : not sure what you mean by "give me access"? If you have an account on the wiki you can edit it here. I can make an account for you if you fee bored :)

PS Damn, I want me a Dynatac 8000!

Ok, I haven't uploaded any more ROMs since this post: Converting a game to ROM - and LOTS of ROM files inside!

Bryce.

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 #424 on: 20:39, 05 July 14 »
Ok, that's 5 pages back, cool :)

As for the edit... still doesn't make sense, since the only thing I did, as I said, was to just copy the link that you were clicking already. Oh well...