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.

Axelay

 
Quote from: ralferoo on 19:34, 29 September 13
Yes, the maximum is 252. If you wrote directly to &DFxx, you could use the remaining 4 slots, but the issue is that the firmware uses this convention for most of the ROM related functions:


Ah, thanks!



Quote from: tastefulmrship on 04:58, 30 September 13

Ok, here's today's ROM. (I'm starting at a new school today & haven't got time to play around with ROM imaging until I get home).
GAME OF |DRAGONS, the ropey but pretty Amsoft platformer.


Oh, I had Game of Dragons!  OK so it was sluggish and fiddly, but it was the first time I think I saw a game that really impressed me visually.  And speaking of ropey games I played in the early days, that reminds me of |BRAXX Bluff!


But then I thought, every Plus got Burnin' Rubber, so why shouldnt the CPC at least have itself |WEC Le Mans?


EDIT: Removed faulty ROM build of WEC Lemans, see my post on page 15 for corrected version.

Gryzor


tastefulmrship

#202
Trying to run through my single filed games... but having little or no joy!
Only these seem to work... but they are pretty good'uns!

|CYBERNOID, |EXOLON & |NEBULUS. Press [SPACE] at the loading screen to start the relevant game.




EDIT: I've tried to get NETHERWORLD working, but I can't seem to see where I'm going wrong (basically because my new job is taking up both my braincells and I can't concentrate on anything else). If you assemble both data-chunks to their respective ADDResses (ie ROM 2 first, then ROM 1) and then CALL &A000, it works fine. However, installing ROM 2 into a slot and then assembling & CALLing the first ROM (ie CALL &C009), it fails. If anyone wants to get this working for me (it's probably something really stupid I've missed), then that'd be great! Ta!

TFM

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

arnoldemu

Quote from: Bryce on 10:25, 30 September 13
Although the CPC can technically (electronically) accept 252 ROMs,
It can accept 255 roms. KL ROM SELECT also allows you to select rom number 253-255.
I think it's the other KL functions that reserve 252-255.

I have a question:

- If a rom board implemented roms 128-255, and only decoded these rom ids. if you plugged this into a plus, would it autoboot like on a real plus or must you implement some kind of "lower" rom signal too?

I just wondered what the asic sends out to the expansion when it selects cart pages.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Axelay

Quote from: tastefulmrship on 19:16, 30 September 13
EDIT: I've tried to get NETHERWORLD working, but I can't seem to see where I'm going wrong (basically because my new job is taking up both my braincells and I can't concentrate on anything else). If you assemble both data-chunks to their respective ADDResses (ie ROM 2 first, then ROM 1) and then CALL &A000, it works fine. However, installing ROM 2 into a slot and then assembling & CALLing the first ROM (ie CALL &C009), it fails. If anyone wants to get this working for me (it's probably something really stupid I've missed), then that'd be great! Ta!


The game worked from ROM for me with those two files, after just padding the two ROM files to the correct length.  You must be working yourself too hard!  ;) 

Bryce

Quote from: arnoldemu on 09:04, 01 October 13
It can accept 255 roms. KL ROM SELECT also allows you to select rom number 253-255.
I think it's the other KL functions that reserve 252-255.

I have a question:

- If a rom board implemented roms 128-255, and only decoded these rom ids. if you plugged this into a plus, would it autoboot like on a real plus or must you implement some kind of "lower" rom signal too?

I just wondered what the asic sends out to the expansion when it selects cart pages.

Yes, electronically it could of course be 256 ROMs if you enable them yourself, but I'm not sure if there are any drawbacks to using the reserved ROM slots. Did any hardware ever use this reserved space?

I haven't tried this, but as far as I know it will not boot from an external 128 - 255 ROM board. The reason for this is that the Cartridge has its own ROMEN signal, so when you turn on the computer it will still be trying to find and enable a ROM connected to the Cartridge port.

Bryce.

gerald

Quote from: Bryce on 10:25, 01 October 13
I haven't tried this, but as far as I know it will not boot from an external 128 - 255 ROM board. The reason for this is that the Cartridge has its own ROMEN signal, so when you turn on the computer it will still be trying to find and enable a ROM connected to the Cartridge port.
Yes ans no  :)
Yes, The LowerROM is working on a plus, so we know that the ROMDIS can override access to the cartridge (at least for lowerRom and upperRom 0 to 32, I never tried other mapping)
No, the plus is booting on ROM 0 of the cartrigde only because the ASIC does the re-mapping/aliasing like it does for upper rom 0 and 7. An external ROM will only be accessible as usual (ie from 0xC000 to 0xFFFF).

redbox

Quote from: arnoldemu on 09:04, 01 October 13
- If a rom board implemented roms 128-255, and only decoded these rom ids. if you plugged this into a plus, would it autoboot like on a real plus or must you implement some kind of "lower" rom signal too?

Now that's an idea.

Cartridge games without the 'cartridges', i.e. make a MegaFlash that starts at 128.  Then you could make your own cartridges to plug into this, no ACID required.

Bryce

@Gerald: thanks, that's a proper/better explanation of what I was trying to say (before I'd had my morning coffee :D )

@redbox: The ACID is needed no matter where you plug the ROMs onto the Plus. No ACID = Computer doesn't run.

Bryce.

redbox

Quote from: Bryce on 13:35, 01 October 13
@redbox: The ACID is needed no matter where you plug the ROMs onto the Plus. No ACID = Computer doesn't run.

Yes, but the ACID is already in the system cartridge.

If the Plus/GX4000 does boot from a MegaFlash type device set to slots 128+ then you could create your own cartridges without an ACID in (i.e. just an EPROM).

Bryce

That's more or less what my Man-In-The-Middle Cartridge was for: MITM - CPCWiki - Easier and cheaper than adding decoding hardware to the expansion port.

Bryce.

TFM

Quote from: Bryce on 15:50, 01 October 13
That's more or less what my Man-In-The-Middle Cartridge was for: MITM - CPCWiki


A smart project, but the PDF is not enough if you want to send that to a company for producing PCBs. It would be nice to have Eagle files or what ever companies do accept.

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

tastefulmrship

#213
Quote from: Axelay on 09:40, 01 October 13
The game worked from ROM for me with those two files, after just padding the two ROM files to the correct length.  You must be working yourself too hard!  ;)
I still can't get it to work on WinAPE; any chance of posting the working ROMs? Ta!
(It's not that I'm doubting you, it's just I REALLY can't get it to work!)

Ah! I see a problem!!!
I had the Cybernoid, Exolon, Nebulus AND Netherworld ROMs installed in random slots around the 15 slots. Netherworld failed to work!
I took the others out and ONLY had Netherworld ROMs in 1 & 2 and it worked! |NETHERWORLD (press [SPACE] at the title screen).




I gave a second go at my single-file version of  |VICTORYROAD. I always loved that loading-screen music.

HAHAHAHAHAHA! I even tried the "STE reworked title-screen" version of |WIZBALL! I still have NO FECKING IDEA how the hell that game works... there's nothing in the code that points to a start address. It just... RUNs! Madness!

Axelay

Quote from: tastefulmrship on 17:35, 01 October 13
I still can't get it to work on WinAPE; any chance of posting the working ROMs? Ta!
(It's not that I'm doubting you, it's just I REALLY can't get it to work!)

Ah! I see a problem!!!
I had the Cybernoid, Exolon, Nebulus AND Netherworld ROMs installed in random slots around the 15 slots. Netherworld failed to work!
I took the others out and ONLY had Netherworld ROMs in 1 & 2 and it worked! |NETHERWORLD (press [SPACE] at the title screen).




Argh!  So do I!!!
And I'm sorry to say it is in the source I posted.  :-[  On the bright side, I did manage to squeeze two stuff ups into a single line of assembly!  That's ... effecient. :-\


What you need to do is find the FindTextLoop routine and replace the line:


    jp po,FindTextLoop-Work_Offset ; if not end of string, keep matching chars


with:


    jp pe,FindTextLoop-FindROM+Work_Space ; if not end of string, keep matching chars


So it was using the wrong condition and only matching the first letter of every search string.  So I imagine the problem you had was that the second Nebulus ROM was being found before the Netherworld ROM.  But even if the condition had been correct, it would have jumped to the wrong address!


Sorry to have caused you so much wasted time.  :(


I've attached fixed versions of the two 2 ROM games I've posted previously, as well as for Netherworld.


TFM

Ts ts ts, I told you guys to use Softbrenner (Made in Germany). You won't have problems with it  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

tastefulmrship

#216
Quote from: Axelay on 11:45, 02 October 13
So it was using the wrong condition and only matching the first letter of every search string.  So I imagine the problem you had was that the second Nebulus ROM was being found before the Netherworld ROM.  But even if the condition had been correct, it would have jumped to the wrong address!
I like the fact that you also have the work-ethic of; "if it's gonna fail, you may as well do it properly!". For me, it's a mantra. ^_^

Seriously, top job for getting the 2 ROM code done in the first place and then sorted to work 100%. Obviously, (and this, TFM, is the reason why people prefer to program code themselves rather than rely on a software package) the code should, going forward, be able to handle 3 or more ROMs.

For example; the CPC-Wiki version of ZYNAPS is 40k in size (very impressive splash screen, naff converted C64 music, cheat mode & main game with title-screen "fix") which would fit on 3 ROMs (@TFM; as far as I am aware, SoftBrenner doesn't support 3 ROMs).
NOTE: I have attached the 3 data blocks for the ROMs here along with the Start & Execute addresses for the program.


    Start Address  - &08F6 -> &A47D
     Total Length  - &9B88
Exececute Address  - &A000

Each DATA block is &33D8 bytes long ( &9B99 / 3 )

08F6 - 3CCD - DATA block 1
3CCE - 70A5 - DATA block 2
70A6 - A47D - DATA block 3



Now, I've only spent a few minutes trying to procedurise (made up word) the code, but haven't had much success. I might have a look over the weekend when I'm not working, but if you can quickly jiggle things around and get it done, then mucho thankos to you. From there, maybe it could be possible to have multi-load games on ROM!

Axelay

Quote from: tastefulmrship on 05:26, 03 October 13
Now, I've only spent a few minutes trying to procedurise (made up word) the code, but haven't had much success. I might have a look over the weekend when I'm not working, but if you can quickly jiggle things around and get it done, then mucho thankos to you. From there, maybe it could be possible to have multi-load games on ROM!


This is not very elegant, but it appears to work!  You could probably make use of a table or list so the details of ROMs, where the data in them goes etc is entirely contained within a loop that reads the particulars of each ROM from the list....  You might say it could be better 'produrised'.  :)


TFM

Quote from: tastefulmrship on 05:26, 03 October 13
(and this, TFM, is the reason why people prefer to program code themselves rather than rely on a software package)


Ah, I wouldn't mind if it would work. Look, if I put a ROM there, then I check it working first. Here I had too often problems with your ROMs, which don't work if other ROMs are already installed.[nb]ROMs created using SB have no problems though.[/nb]


You would be right, if your code would work. However I have no time to check this again, so I wish you just good luck for the future[nb]The Future is owned by FutureSoft[/nb]!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

tastefulmrship

#219
Quote from: TFM on 17:41, 03 October 13
Ah, I wouldn't mind if it would work. Look, if I put a ROM there, then I check it working first. Here I had too often problems with your ROMs, which don't work if other ROMs are already installed.[nb]ROMs created using SB have no problems though.[/nb]
All ROMs worked when I posted them; admittedly they were tested on their own (well, with BASIC, STarkos & PARADOS), but I have manage to fill the 15 slots and still get them all to work.

The only thing I can think of is that I am not using the SCF command when initialising the ROM (it just RETs to BASIC). Is this a mandatory command? If so, then this could be reason why some of my ROMs are simply failing for you. It shouldn't take too long (a few weeks maybe) to completely re-build them all with it in. My build code has it in; so all subsequent ROMs will have it. Other than that, I am using Octoate's ROM code like everyone else.



I still believe in "doing it yourself" rather than relying on a software package. I am learning a hell of a lot more about programming than I would if I was just clicking 'R' and 'S' and giving a file a name. I realise you guys are all experts at everything and very little is new or difficult for you; well, I am far from being even "clueless" (ok, "mostly clueless"). A lot of things on the CPC are difficult to me and I like to learn. So stop trolling people who are trying to learn what you already have known for 25 years and maybe this community can get back to being a nice place to be. (I'm pointing at MORE than just one person, here)

Quote from: Axelay on 15:17, 03 October 13
This is not very elegant, but it appears to work!  You could probably make use of a table or list so the details of ROMs, where the data in them goes etc is entirely contained within a loop that reads the particulars of each ROM from the list....  You might say it could be better 'produrised'.  :)
Excellent stuff, as ever, thank you!

redbox

Quote from: tastefulmrship on 05:19, 04 October 13
My build code has it in; so all subsequent ROMs will have it. Other than that, I am using Octoate's ROM code like everyone else.

It's really cool that you're learning Z80 instead of just using a utility, good work :)

Can you post your template code? I couldn't find the original Octoate code anywhere.

TFM

Quote from: tastefulmrship on 05:19, 04 October 13
Other than that, I am using Octoate's ROM code like everyone else.


Dunno that code, use my own.


Well, as long as one know that if a ROM doesn't work it's just needed to switch all others off, that's fine.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

tastefulmrship

#222
Quote from: redbox on 07:21, 04 October 13
It's really cool that you're learning Z80 instead of just using a utility, good work :)

Can you post your template code? I couldn't find the original Octoate code anywhere.
Sure, here's the code (with the added SCF) I am using...


; ROM build code by Octoate (c)2013
; BITBuster depacker by T&J (c)2013

        org    &c000

        defb    &01, 0, 0, 1
        defw    rsx_name_table

        jp    init_rom
        jp    run_game

.rsx_name_table    defm    "Game Name her", "e"+&80
        defm    "RSXCOMMAN","D"+&80
        defb    0

.init_rom    scf
        ret

.run_game   
        ld    hl,DATAStart
        ld    de,&6420
        ld    bc,&3Cc0   
        ldir
        jp    &A000

        org    &6420

.DATAStart
    nolist
[The BITBuster packed code goes here]
    list
; The decompressor code usually ORGs to &A000 unless the packed version I'm working from needs to be located at 0100 or above A000.
        ld    c,&ff
        ld    hl,RestartROMs
        call    &bd16

.RestartROMs    call    &bb57
        call    &bccb
        call    &bb54

        ld    hl,DATAStart
        ld    de,&2710

.BITBuster    DI
        EXX
        PUSH    BC
        PUSH    HL
        PUSH    DE
        EXX
        CALL    depack
        EXX
        POP    DE
        POP    HL
        POP    BC
        EXX
        EI

        ld    bc,&7f8d     ; disable ROMs
        out    (c),c 

        jp    &620C

[The BITBuster decompressor code goes here]


Now, I use a quick &C000-&FFFF LDIR code to fill the screen with &FF. Then assemble the code and SAVE the screen.
I always test them in WinAPE before posting here!

Quote from: TFM on 18:02, 04 October 13
Well, as long as one know that if a ROM doesn't work it's just needed to switch all others off, that's fine.
Right, now can you stop fecking moaning like a little fecking kid and just say WHICH ROMS DO NOT WORK FOR YOU?

If I know which ones YOU are personally having problems with, then I can see if I can work out where it's failing and maybe fix all the others while I'm at it.

TFM

Hey bad taste ;-)


Your code does miss the most important part! It does not integrate the RSX into the system!


Your init_rom just does nothing! It must tell the system about the RSX.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

IanS

Quote from: TFM on 21:21, 04 October 13
Your init_rom just does nothing! It must tell the system about the RSX.
No, the init_rom just needs to reserve workspace memory if it needs any. It's common to display a message to show your rom on the startup screen, but the very fact it has a command table is enough to let the system know about the RSXs.

What do you think it should do?

Powered by SMFPacks Menu Editor Mod