Hi !
A simple question... As everybody know (or not?) amstrad firmware is able to initialise the 16th first roms (0-15) on cpc 6128 and up to 8 (0-7) on cpc 464.
But if i want to use 16-31 slots, how can i do to init them ? Does anyone know about it ?
Please, don't speak about "booster.rom", i don't want to use it...
Thanks for your futures advices!
Quote from: Ast on 14:58, 12 January 18
Hi !
A simple question... As everybody know (or not?) amstrad firmware is able to initialise the 16th first roms (0-15) on cpc 6128 and up to 8 (0-7) on cpc 464.
But if i want to use 16-31 slots, how can i do to init them ? Does anyone know about it ?
Please, don't speak about "booster.rom", i don't want to use it...
Thanks for your futures advices!
Fw 3.1 initialises 0-31
Sent from my ONEPLUS 3t using Tapatalk
Sorry but, rom 16-31 are not initialised with fw 3.15 :/
All i want to see would be a piece of code... why not ?
If you can't i will take a piece of cake...
...there are two different type of FW31.5. One with 16 ROM slot support and another with 32. Look a the filenames on the disk image.
Thanks for your help!
I have decided to code my own and i have succeeded!
iMPdos does it during the boot (all 32 roms are initialised!)
Would you mind explaining how is it done, please?
Of course, i will do it tonight!
Here is the code source :
org #a000
;
; Add roms 16 up to 31
; (c)Ast/iMPACT January 2017
;
di
num ld a,16 ; We start with rom number 16
ld bc,#7f84+2 ; Upper rom On | Lower rom off | Mode 2
out (c),c
ld b,#df
out (c),a ; Connect the rom selected in Upper Rom
ld a,(#c006)
cp #c3
call z,found ; If a rom is found.....
ld a,(num+1)
inc a ; next rom
ld (num+1),a
cp #20 ; Max Rom
jr nc,allromsok ; Si rom>=#20 go to
jr num ; Else test if next rom is connected
allromsok
ld bc,#7f8e ; Upper and Lower roms off | Mode 2
out (c),c
ld bc,#df00 ; Select Rom 0
out (c),c
ei
ret
;
; If a rom is found then...
;
found
ld a,(num+1) ; a=rom number found
ld hl,(#b8d3) ; Last rom found Adress
push hl ; save it
dec hl
dec hl
dec hl
dec hl ; New adress
ld (#b8d3),hl ;
pop de ; de=hl
ld (hl),e ; poke new rom adress
inc hl
ld (hl),d
inc hl
ld (hl),a ; and rom number
inc hl
ld (hl),0
ret
I hope it could help some people to understand how it works...
Thank you for reading as Capcom said !
Thank you for the code. :)
If anyone wants to use this code on 464, then you can start at 8 and use &b1a6 instead of &b8d3.
So all have been said... :P
Thanks @Ast (http://www.cpcwiki.eu/forum/index.php?action=profile;u=573) , very handy :)
How do the extra roms reserve memory?. Does each extra rom get IY setup correctly when the commands are run?
Ast,
The code you supplied assumes all ROM types require initialization which is incorrect. There are 3 types foreground, background and extension.
According to Soft968 Section 10 which states that foreground ROMs are responsible for initializing background ROMs. Extension ROM types are never initialized since they provide only support routines and jump instruction at &C006 may cause problems if called unexpectedly.
The code should have tested the ROM type (at &C000) and if it is a foreground/background type then assume the jump instruction is at &C006 to initialize the ROM. This is how the firmware manual describes how the system handles ROM initialization. Soft968 Section 10 also references initializing background ROMs via KL_ROM_WALK and KL_INIT_BACK, but these are for background ROMs with no foreground ROM as I understand it.
rpalmer
In addition there are three more ROM types:
- FutureOS extension ROMs (ignored by native OS)
- CP/M expansion ROMs (ignored by native OS)
- Background ROMs returning with Carry cleared from initialization, therefore not using RAM, but able to display a sign on message for example.
don't panic ! It runs ! That's the most important no ?
Hey, old thread I know but thanks to Ast for the Rom initialisation code and thanks to Arnoldemu for the tweek. I used this code on my 464 and assembled it to &8000 instead of &a000 and saved as a binary file. Now all 0-31 roms are working.
Happy New Year everybody.
Great !
It's cool to read someone is using this piece of code. Thanks to U !