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 2 Guests are viewing this topic.

redbox

Quote from: SyX on 16:44, 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...

SyX

Quote from: redbox on 18:11, 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.

Axelay

Quote from: SyX on 18:34, 11 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.  ;)


Quote from: SyX on 18:34, 11 June 14
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.

Tai

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:


; 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).

gdiazlo

I agree, the current approach seems a bit like an overengineering something that should load games from rom.

regards,


arnoldemu

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.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: Tai on 13:03, 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

Tai

Quote from: arnoldemu on 13: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.


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

SyX

Quote from: Axelay on 10:37, 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  ;)

redbox

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

Tai

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

redbox

Which is exactly what I have been doing (see previous header code I posted)...

tastefulmrship

#412
Quote from: robcfg on 22:44, 09 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!




Nilquader

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
--
Nilquader of SPRING
http://www.nilquader.net/

Gryzor

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!!!

tastefulmrship

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





Gryzor

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?

Bryce

Nope, I haven't uploaded any of the ROMs on this page of the thread.

Gesendet von meinem Motorola DynaTEC 8000X mit Tapatalk 2.


tastefulmrship

#418
@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!

Gryzor

@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!

tastefulmrship

#420
Quote from: Gryzor on 17:35, 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! ^_^

Gryzor

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

tastefulmrship

Quote from: Gryzor on 17: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?
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!

Bryce

Quote from: Gryzor on 17: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!

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

Bryce.

Gryzor

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

Powered by SMFPacks Menu Editor Mod