Author Topic: Rom Initialisation  (Read 321 times)

0 Members and 1 Guest are viewing this topic.

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 820
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 500
Rom Initialisation
« on: 15: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!
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.095
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1064
Re: Rom Initialisation
« Reply #1 on: 16:23, 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


Offline Ast

  • 6128 Plus
  • ******
  • Posts: 820
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 500
Re: Rom Initialisation
« Reply #2 on: 01:08, 13 January 18 »
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...
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 393
  • Country: de
    • index.php?action=treasury
  • Liked: 168
Re: Rom Initialisation
« Reply #3 on: 14:17, 13 January 18 »
...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.
...proudly supported Pentomino with GFX

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 820
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 500
Re: Rom Initialisation
« Reply #4 on: 12:39, 15 January 18 »
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!)
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Online robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.823
  • Country: es
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 718
Re: Rom Initialisation
« Reply #5 on: 13:43, 15 January 18 »
Would you mind explaining how is it done, please?

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 820
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 500
Re: Rom Initialisation
« Reply #6 on: 15:29, 15 January 18 »
Of course, i will do it tonight!
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 820
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 500
Re: Rom Initialisation
« Reply #7 on: 22:06, 15 January 18 »
Here is the code source :


Code: [Select]

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

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.202
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2071
Re: Rom Initialisation
« Reply #8 on: 22:18, 15 January 18 »

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.

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

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 820
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 500
Re: Rom Initialisation
« Reply #9 on: 22:36, 15 January 18 »
So all have been said...  :P
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !