avatar_m_dr_m

[M4Board + XMem] Can M4 ROM be installed on the XMem? [Resolved: Answer is NO!]

Started by m_dr_m, 02:29, 09 February 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

m_dr_m

I wonder if the M4-ROM, installed by default on ROM 6 on the M4, can be installed on the XMem.


Goal: get the full ROM range 0-63, and be able to access to transfer files from M4's SD to XMass (CubeMDos).



Here what I tried:
- M4: Start at 32
- M4: M4ROM at 64 ("Enabled", but I guess it doesn't change anything)
- The lowrom is the standard firmware.
- XMEM: M4ROM at 6.
Once this one ^^ burned, the CPC crashes at boot (change screen offset + freeze). Even if I unplug the M4.


I'm curious whether someone managed to setup a similar configuration.


Have a wonderful day!

SOS

Quote from: m_dr_m on 02:29, 09 February 21
I wonder if the M4-ROM, installed by default on ROM 6 on the M4, can be installed on the XMem.

...
- XMEM: M4ROM at 6.
Once this one ^^ burned, the CPC crashes at boot (change screen offset + freeze).
Simple "No"
The M4-ROM is on the M4-Card an writable ROM, it's more a RAM as a ROM.
The ARM writes the data of the result-phase in the M4-ROM, so the M4-ROM can only be installed on a M4-Card, never on an other ROM-Board

roudoudou

Quote from: SOS on 07:01, 09 February 21
Simple "No"
The M4-ROM is on the M4-Card an writable ROM, it's more a RAM as a ROM.
The ARM writes the data of the result-phase in the M4-ROM, so the M4-ROM can only be installed on a M4-Card, never on an other ROM-Board
wwwhhhaaaaaaaaaaaaaattt? the ROM is not a ROM?  :o
My pronouns are RASM and ACE

TotO

I have set the X-MEM and M4 on a 464 with M4ROM at ROM7 and other ROM from 32 to 63.
But, I'm pretty sure to have used the M4ROM as ROM6 on an X-MEM in the same way with a CPC6128 when the M4 was released.
Does the M4ROM was no more a ROM but a "dirty hack" of the memory since?
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

m_dr_m

Thanks 🆘!


Too bad there isn't a check + nice error message (also, the screen crash is weird, I would have expected an infinite loop at worse). 
Since @Duke has released the source (great move), maybe I should add that myself!


I guess the only option then is to use the modified low ROM which detect the M4ROM at a place > 31.
By the way, I plan to make a customisable version of this lower firmware. Check the upcoming thread!


Thanks TotO for the input! Yes I imagine the rewritable feature enabled some fancy stuff (status, persistence, ...).

m_dr_m

Quote from: roudoudou on 08:25, 09 February 21wwwhhhaaaaaaaaaaaaaattt? the ROM is not a ROM?

Each time the M4 is reset, the 512k ROM dump (/m4/romslots.bin on the SD) is loaded into ARM's flash, if I understand correctly.

Duke

Quote from: m_dr_m on 12:51, 09 February 21
Each time the M4 is reset, the 512k ROM dump (/m4/romslots.bin on the SD) is loaded into ARM's flash, if I understand correctly.
The romslots.bin is only used when a new rom is added/changed, rest of the time the ARM flashrom keeps the rom.
It's used when reflashing, because the sector erase on the ARM flashrom is in 128KB size, and I do not have 128KB (available) RAM to store its contents in when erasing and rewriting a sector. So its kind of shadow file.

SOS is correct about the M4 rom, it is loaded into the ARM's RAM, so it can change dynamically, there's even a command to write to the ROM contents. Same goes for the "HACK menu" rom, its also stored in RAM.

As for combing all rom slots of XMEM and M4 is to either use slot 7 for the M4 rom (as XMEM does not map it, but some CPC's dont like it) or yes, hacking the modified lowerrom to use a higher slot.

m_dr_m

Totally makes sense, thanks!


About the hack feature: is there some documentation to hack the hack? I'd like to either:
- Read the current MMR / RRM for soft breakpoints.
- Be able to replace the hack menu by Orgams's monitor / step by step debugging trace mode.


Well, same possibility than with Multiface II.


m_dr_m

Quote from: Duke on 13:04, 09 February 21SOS is correct about the M4 rom, it is loaded into the ARM's RAM, so it can change dynamically, there's even a command to write to the ROM contents. Same goes for the "HACK menu" rom, its also stored in RAM.

Now that I think of it, couldn't the M4ROM loads itself (at regular ROM init time) into the ARM RAM?
In that way it could come from any rom board (as long as the M4Board is present!!).

It's not a request, I just like to understand the technical limitations.

Duke

Quote from: m_dr_m on 13:12, 09 February 21
About the hack feature: is there some documentation to hack the hack? I'd like to either:
- Read the current MMR / RRM for soft breakpoints.
- Be able to replace the hack menu by Orgams's monitor / step by step debugging trace mode.
Only the source code and the thread I started here with a brief explanation of its workings.
https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/m4-board-hack-menu-source-code/

As for RMR/MMR it is stored in the "SNA config" at offset 0x100 of the hack rom (this is a dynamic area that reflects hardware registeres at the time of invoking the hackmenu)
In the source code:
https://github.com/M4Duke/m4hackmenu/blob/master/nmirom.s
Line 1262 you can see how I display the RMR / MMR / ROMsel on the screen by reading the SNA config.
Quote from: m_dr_m on 13:17, 09 February 21Now that I think of it, couldn't the M4ROM loads itself (at regular ROM init time) into the ARM RAM? In that way it could come from any rom board (as long as the M4Board is present!!).

Sure, that would be possible. Already it checks for "M4ROM.BIN" in root of microSD card, this will be loaded instead of the embedded rom if present (so this is what you use to easily make your own modifications).
Using the C_ROMWRITE command you could load a replacement from anywhere and overwrite it at runtime if wanted. Still it has to fit in the CPC rom map without colissions with XMEM, so not sure it helps much.

m_dr_m

Thanks a lot! That will be fun to hack.


Oh, last question (until the next): is there similar restriction/gotcha about the Lower ROM?
I've tried to put FW315FR.ROM (of XMEM fame) as Low ROM in slot 31, the CPC wouldn't boot at all (no signal on my screen, so I guess it doesn't even reach CRTC init).

GUNHED

At my 6128plus setup I do use the M4 card with the 4 MB RAM expansion. Works fine.


And for the CPC6128 I use the X-MEM + Y-MEM (no this is not mathematics...). Works fine too.

http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Duke

Quote from: m_dr_m on 14:12, 10 February 21
Oh, last question (until the next): is there similar restriction/gotcha about the Lower ROM?
I've tried to put FW315FR.ROM (of XMEM fame) as Low ROM in slot 31, the CPC wouldn't boot at all (no signal on my screen, so I guess it doesn't even reach CRTC init).
There is no restriction on the lower ROM.
I think FW315 may have dependency on the X-MEM being there(ramdisk?). FW316 works fine IIRC.


Duke

Quote from: genesis8 on 19:11, 10 February 21
Where can firmware 3.16 be downloaded ?
Not sure where I downloaded it, but attached it to this post.


Ast

_____________________

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

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

m_dr_m

Thank you very much!


I retried with 3.16, works like a charm.
I guess I did a bad manipulation last time (despite double checking the uploaded ROM and the absence of conflict).
Or maybe it was some bad interaction with my other cards (for now the M4 is isolated !).

zhulien

With most of the other threads about DMA and the CPC they generally say DMA on CPC is impossible, i would definitely consider the M4 as having DMA - just not in the typical sense - and because it writes directly to the rom space (which is RAM from the M4's point of view and of course still memory from the CPC's point of view).  I think quite a bit of other hardware could benefit from the same or similar arrangements.  I believe some form of video streaming should be possible with the M4 because of the DMA.

Powered by SMFPacks Menu Editor Mod