News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

FIRMWARE 3.1 / Lower ROM / Megaflash

Started by TotO, 14:54, 18 October 12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TFM

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

redbox

Quote from: SyX on 22:16, 30 January 13
No, you haven't to do anything special, KL_ROM_WALK is fixed to start the initialization in the rom 31 (the address $0327 in the firmware rom has the starting rom number, 31).

Is this all you did?

I spent hours trying to do this with the lower ROM (for use in a plus cart) and it never worked and I always got a resetting boot loop. 

However, I only ever tried it in an emulator (WinApe) and I never tried it on a real machine...  ???

SyX

Quote from: redbox on 12:46, 11 February 13
Is this all you did?

I spent hours trying to do this with the lower ROM (for use in a plus cart) and it never worked and I always got a resetting boot loop. 

However, I only ever tried it in an emulator (WinApe) and I never tried it on a real machine...  ???
Yes and an extra check there is a few bytes later (take a look in the upgraded rom). The reset boot loop only happened in winape for me. In caprice or cpcjava worked perfectly, and in the real machine too, as CraigsBar tested the last week :)

Welcome back!!! ;)

redbox

Quote from: SyX on 15:18, 11 February 13
The reset boot loop only happened in winape for me.

That's a lesson for me.  Spent literally ages trying to get that to work but was only using WinApe  >:(

Glad you had success though!  Must include your ROM in my Plus System Cartridge  :)

SyX

#79
CraigsBar has made a wonderful job making cartridge images with it, now they are in this thread, but when i can, i will prepare a page in the wiki with everything related to this revision of the firmware.

PS: And always test in the real machine, i have made this fault a lot :P

TFM

That happended exactly once to me! Not a second time! I had the perfect pixelwise scrolling, on an emulator, but it didn't work on the CPC. I learnt from that!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

redbox

Quote from: SyX on 15:29, 11 February 13
PS: And always test in the real machine, i have made this fault a lot :P

Was wondering about this so had a look at your Firmware with a Hex editor.

I see you've patched KL ROM WALK and KL INIT BACK, replacing &0F with &1F and &10 with &20 respectively.  However, I noticed that you haven't patched KL FIND COMMAND which also has a CP &10 in the original ROM at &02ec.

Does this mean that even though the extra ROMs initialise that the firmware won't be able to find the RSXs in them when they're called?  Has anyone actually tried this on real hardware...?

TotO

ROM 3.12 are available at the first page.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Gryzor

Just noticed that, apparently, FW3.1 ruins CATart? Or is it my idea? I was trying to play Subhunter (Sunday morning FTW! Coffee, cigarette, CPC! That's a different 3C from the one our French friends know ;) ) and with it enabled it comes up all fouled up...

TotO

MODE 2 may ruin CAT Art using "CAT" command, but not the FW as I know.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Gryzor

Yeah, I thought about it, but the CATart screen is switched to mode 1 anyway... lemme try.


Huh. Yes, indeed it's in mode 1. However, if I switch to mode 1 manually before CATing, it appears fine. Strange?

TotO

I think it's because the CAT command not init properly the catalogue column display, when the mode is changed.
If you use |DIR instead, that may work fine again.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Gryzor

Yup, |Dir did the trick. What's the difference?

Munchausen

Sorry for the double post, but thought I'd post here for anyone watching this thread.


My 464 displays RAM as 560KB with FW3.12 and a Symbiface, does anyone know why?


See my other thread for full details: SYMBiFACE edge connector issues

TotO

Look Like 64+512-16K ...
May be the Symbiface eat a 16K bank for it's personal use?
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

gerald

Quote from: TotO on 17:02, 13 May 13
Look Like 64+512-16K ...
May be the Symbiface eat a 16K bank for it's personal use?

Or maybe FW3.x does not properly detect RAM  ;D
On a 464, if the memory extension does not force the mreqn signal, the internal ram will be written as well as the extension one.
Some background in this thread 464 and ram extension .... with a memory test that you can run.

Anyone knows how the FW 3.x does the memory detection ? The detection algorithm may not count the 0x4000-0x8000 internal ram as it get corrupted by  the external ram testing.



TotO

#91
Tests was done, and it display up to 576K by 16K steps. :)
As I know (but SyX can explain better) some "read/write" was done on each pages from 16K to 576K.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

SyX

This is the code for the ram check, feel free of taking a look to find the elusive bug:    ; Inicializamos la lista de páginas de ram extendida
    LD   H,D
    LD   L,E
    DEC  L
    LD   C,32 - 1
    LDIR
   
    ; Detectamos cuantas páginas de 16KBs de RAM extendida tenemos disponibles
detect_expansion_ram
    LD   B,>GATE_ARRAY

    ; Marcamos la página 1 de RAM principal
    LD   A,$C0
    OUT  (C),A
    LD   A,$FF
    LD   (RAM_P1),A
   
    ; Marcamos todas las páginas de ram extendida
    LD   HL,RAM_P1          ; HL --> Dirección donde se pagina la RAM extendida
    LD   A,$C4              ; Primera página de RAM extendida
    LD   DE,$FF * 256 + 32  ; Contador para las páginas
.loop_mark_expansion_ram
    OUT  (C),A              ; Hacemos visible la página
    LD   (HL),D             ; Y la marcamos

    ; Pasamos al siguiente banco, asegurándonos que el bit 2 está activo
    INC  A         
    AND  %11111011
    OR   %00000100         

    DEC  E
    JR   NZ,.loop_mark_expansion_ram

    ; Analizamos todas las páginas de ram extendida
    LD   HL,RAM_P1          ; HL --> Dirección donde se pagina la RAM extendida
    LD   A,$FF              ; Marcador que acabamos de escribir
    LD   BC,GATE_ARRAY + $C4 ; Primera página de RAM extendida
    LD   DE,1 * 256 + 32    ; Contador para las páginas
    LD   IX,EXPANSION_PAGES ; Puntero a la lista de páginas de ram
.loop_detect_expansion_pages
    OUT  (C),C
    CP   (HL)
    JR   NZ,.page_used
.page_no_used
    ; Escribimos el contador en la lista y en la página; y los incrementamos
    LD   (HL),D
    LD   (IX + 0),D
    INC  D
    JR   .goto_next_page

.page_used
    ; La marcamos en la lista como página inexistente
    LD   (IX + 0),$00
   
.goto_next_page
    INC  IX
    ; Actualizamos a la siguiente página de RAM extendida
    INC  C
    RES  2,A
    AND  C
    SET  2,A                ; Nos aseguramos que el bit 2 esté activo
    LD   C,A
    LD   A,$FF
    DEC  E
    JR   NZ,.loop_detect_expansion_pages

    ; Calculamos el número de páginas de ram extendida encontradas
    ; Volvemos a situar en $4000 la primera página de RAM principal
    LD   C,$C0
    OUT  (C),C

    ; RAM Pages -> D - 1 / RAM Total -> 64 + (D - 1) * 16
    DEC  D

    CP   (HL)
    JR   Z,.end_fix_expansion_pages
    ; Arreglamos la lista de páginas detectadas (D = 2 y $4000 $01,"SyX")
    ; Ya que en una de las paginaciones se puso la ram principal
    LD   B,32               ; Contador para las páginas
    LD   HL,EXPANSION_PAGES ; Puntero a la lista de páginas de ram
    XOR  A
.loop_fixing_list
    CP   (HL)
    JR   Z,.continue_fixing
    DEC  (HL)
.continue_fixing
    INC  HL
    DJNZ .loop_fixing_list
    DEC  D
.end_fix_expansion_pages
    ; Actualizamos el número de páginas (+ 64 KBs de base RAM)
    LD   A,D
    ADD  4
    LD   L,A
   
    ; Y el número de KBs
    XOR  A
    REPT 4
        SLA  L
        RLA
    ENDR

    LD   H,A

Remember that i don't have a symbiface or a ram expansion (neither the LowerRom board or HxC...), because that, at least somebody sends this kind of hardware for testing, i can only use the emulators for checking and i get always 576 KBs in them when use a 512 KBs expansion.

gerald

Got it  ;D


    ; Calculamos el número de páginas de ram extendida encontradas
    ; Volvemos a situar en $4000 la primera página de RAM principal
    LD   C,$C0
    OUT  (C),C

    ; RAM Pages -> D - 1 / RAM Total -> 64 + (D - 1) * 16
    DEC  D

==> CP   (HL)
    JR   Z,.end_fix_expansion_pages
    ; Arreglamos la lista de páginas detectadas (D = 2 y $4000 $01,"SyX")
    ; Ya que en una de las paginaciones se puso la ram principal
    LD   B,32               ; Contador para las páginas
    LD   HL,EXPANSION_PAGES ; Puntero a la lista de páginas de ram
    XOR  A
.loop_fixing_list
    CP   (HL)
    JR   Z,.continue_fixing
    DEC  (HL)
.continue_fixing
    INC  HL
    DJNZ .loop_fixing_list
    DEC  D
.end_fix_expansion_pages
    ; Actualizamos el número de páginas (+ 64 KBs de base RAM)
    LD   A,D
    ADD  4
    LD   L,A
   
    ; Y el número de KBs
    XOR  A
    REPT 4
        SLA  L
        RLA
    ENDR

    LD   H,A

The CP (HL) will always follow the  NZ  branch on a 464 with a extension that does not drive mreq.  The content of the base ram will match the content of the last extension block writen, not the FF marker.
You end up by decrementing D once more. D=31 instead of 32 => (31+4)*16= 560k
You can check that behaviour on emulator by changing the base ram marker for something different than 0xff.

If you want to properly fix the memory check, you should verify that the base ram is not corrupted when you write to the extension. If ram is corrupted, do not count the block as valid.

If you want to detect a 464 with  a non compatible extension, you may check that write to extension block corrupt the base ram, but write to base ram does not corrupt the extension ram.

Anyway, just have the confirmation that the symbiface ram extension does not work on 464.

redbox

Quote from: gerald on 09:58, 14 May 13
The CP (HL) will always follow the  NZ  branch on a 464 with a extension that does not drive mreq.  The content of the base ram will match the content of the last extension block writen, not the FF marker.
You end up by decrementing D once more. D=31 instead of 32 => (31+4)*16= 560k
You can check that behaviour on emulator by changing the base ram marker for something different than 0xff.

Good work, that is impressive  :)

Kris


00WReX

Hello All,

I am still using a 'Bryce' LowerROM board with MegaFlash and have been running 'Custom' Firmware 3.1 on it .
I recently thought it was about time to upgrade to the latest 'Custom' firmware as I knew that there had been updates.

I did a lot of searching and only found minimal bits of information regarding the 'Custom' firmware and nothing really
that gave a good indication of the latest version.

I finally found a post that mentioned FW 3.15 and then eventually found my way to the 'CentPourCent [dot net]' website
and downloaded the DSK image from the X-Mem page, then extracted the FW 3.15 ROMs etc, etc.

Is there a thread or website or anything relating to the 'Custom' firmware as it sort of seems a bit hidden (unless
you are using an X-mem).

From my quick testing, FW 3.15 is working perfectly with the Lower Rom & MegaFlash...Due to the fact I could only find
it on the X-mem page I was unsure if it was being specifically adapted for that.

Cheers,
Shane
The CPC in Australia...
Awa - CPCWiki

TotO

#97
You are right, the FW3.15 (LOWER) and its expansion (ROM 1) are not listed out of the X-MEM floppy disc.
Yes, they should work with the LowerROM and the Megaflash too.

The main FW315EXP.ROM features are:
- |FLASH allow to flash the ROM from the BASIC
- |HELP list the ROM content
- |HELP,<nb> display the ROM <nb> RSXs
- |C RAM Drive (0K, 256K, 448K)
- Remove CTRL+key new shortcuts for a better compatibility

Here the last files.  8)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

00WReX

Thanks TotO for the very quick reply and attached file.

I have just updated the ROM List on the Wiki with the file you provided as it only had the 3.12 file previously.

ROM List - CPCWiki


Cheers,
Shane
The CPC in Australia...
Awa - CPCWiki

TotO

#99
Thank you for the wiki update. I will not forget for the next time!  8)
(for information, I got two lower boards that I no more use... Need an EPROM flasher to update them)

"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Powered by SMFPacks Menu Editor Mod