Memory Full

Forum / Development

Cleanly Reset ROM Disc

Hicks * 15 Mar 2022 16:18:32 * Modified at 16:20:13

I just realized that I never needed to load with the Amsdos after destroying the entire ram.

I know how to reinitialise ROM 7:

    ld hl,(#be7d)
    ld a,(hl)
    ld (num_drive),a

% !! TRASH everything here !!

    ld hl,#abff
    ld de,#40
    ld c,7
    call #bcce

    ld hl,(#be7d)
num_drive = $+1
    ld (hl),0


But I need to reinit #00-&40 and >#a600 areas.
How do you do it?
I saw some methods here and here, but I am not sure of their reliability.

ast * 17 Mar 2022 14:50:25 * Modified at 14:51:38

Hi,

you will find some ideas here :

https://amstradplus.forumforever.com/t427-Loader-sous-Amsdos.htm
or
https://amstradplus.forumforever.com/t381-Loader-universel.htm

But, but, but... In my mind, restoring rom 7 wil make it difficult to maintain mass memory compatibility.

The only solution I see is to restore the memory range from #a6xx to #bfff (So it will need to save it previously wherever you want before restore it!)

Axelay/PA * 10 Apr 2022 13:39:37

I've been looking in to this a bit myself lately, and have been wondering about mass storage devices. Are you saying you would need to save &a600-&bfff somewhere to maintain compatibility with mass storage? That seems ludicrous if I've understood you correctly.

ast * 10 Apr 2022 16:40:44

it's more complicated.
If you want a better way, you'll have to do a basic program which could execute your asm code, because, unfortunately, when you run" your binaries code, all i/o system is reseted and i/o tape is reinstalled. That's why you need to re-activate rom 7 (except on a basic program).
So first step is :

-doing a basic program
-save #A6xx-#bfff plage
-execute your code
-restore saved plage
-load your next code
...etc...


Using this way will do you code compatible with ALL mass storage and amsdos, of course !

gurneyh * 10 Apr 2022 17:23:42 * Modified at 17:24:19

"The only solution I see is to restore the memory range from #a6xx to #bfff (So it will need to save it previously wherever you want before restore it!)"
So AST, You're describing what I did, right?

ast * 10 Apr 2022 19:10:51

I prefer "the best solution" and yes, it's probably what you did.
I will probably write an article about that.