News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Joseman

weird thing about memory dump on winape/caprice vs cpcemu/ACE

Started by Joseman, 22:13, 19 October 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joseman

Hi

I was looking the AMSDOS reserved area and, with the 4 emulators at start they don't display the same

winape and caprice put on the most areas &00

but

cpcemu and ACE put &00's and &FF's

with the emulators at cold reset, what is the reason of this differences?

Thankyou!




SerErris

If you do a cold reset in the CPC and you would stop the CPU clock just before any code execution (PC=0000) then all the Memory is in undefined state. It actually does not matter what is in there. Any code in any ROM assumes that there is random value in the RAM and it would need to zero whatever it wants to do before actually using it, or in case of copy from rom, just copy it. It just would not matter what was there before.

So mostly a design decision by the author of the emulator. It also would not make sense to fill the memory with random values like the real thing would look like on startup, so why not keep it at zero or FF whatever value.
Proud owner of 2 Schneider CPC 464, 1 Schneider CPC 6128, GT65 and lots of books
Still learning all the details on how things work.

roudoudou

Quote from: Joseman on 22:13, 19 October 24Hi

I was looking the AMSDOS reserved area and, with the 4 emulators at start they don't display the same
winape and caprice put on the most areas &00
but

cpcemu and ACE put &00's and &FF's
with the emulators at cold reset, what is the reason of this differences?
Thankyou!


A real CPC will have that pattern* in memory at startup so Winape initialisation is wrong (it's also wrong for Winape to boot in IM 1 mode)

so some programs/cartridge/rom developped on emulator will RUN without side effect, but crash on the real machine

*memory expansion can have other pattern or random, but not the CPC
My pronouns are RASM and ACE

Joseman

Thanks for the answers

I don't know where i supposed/read the CPC initializes the main memory but not the extra RAM.

I think is strange that the lower rom on start don't do that, but maybe is for a quicker start?

I took a look at the memory on a real cpc with the M4 and yes, is the same than in Ace and CPCemu.

It looks weird that winape make a thing so wrong that initialize the CPC with bad IM, but, ¿in what IM starts a real cpc? i'm curious.

Regards

roudoudou

Quote from: Joseman on 07:15, 23 October 24Thanks for the answers
It looks weird that winape make a thing so wrong that initialize the CPC with bad IM, but, ¿in what IM starts a real cpc? i'm curious.
Regards

Z80 boots in IM 0, not really usable on CPC (until...)
My pronouns are RASM and ACE

Prodatron

One of the first things you always do when cold-booting a Z80 platform is to switch the CPU to IM1 (or 2). So somehow it's not a problem, that WinApe starts the Z80 in IM1 mode, as it will be switched to IM1 immediately anyway.
Only when you write your own boot ROM/CPR and forget the IM1 switch, you think everything is fine in WinApe and then wonder why the shit crashes on a real machine ;D

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Powered by SMFPacks Menu Editor Mod