News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Nasty X-MEM related bug in 21st Century Western Europe

Started by madram, 22:08, 13 November 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

madram


I had a pretty hard time debugging a crash in incoming Orgams feature.
The offending code was accidentally unlocking X-Mem software write protection (with manual switch set to 'free').


Or so I thought.


My X-Mem use W29C040 chip (which use &100-bytes page). Each command sequence begins with:
- Write &AA to &5555
- Write &55 to &AAAA
- Write n to &5555  (command n)


The problem here is that the crash intervenes at the first write, defeating the purpose of the sequence.


We can reproduce this issue with:



   ld c,1     ; rom xxxxxx01
   call &b90f
   ld hl,&d555
   ld (hl),&aa
   ret        ; isn't reached



Or, if monogams is installed in ROM 4*n+1, the trace session will crash :



   BRK
   ld hl,&d555
   ld (hl),&aa



This is very inconvenant, because this means than any ROM at such position writing &aa to this screen address will crash.


Known workarounds :

       
  • Hardware write protection (X-Mem onboard switch)
  • Put offending ROM in even numbered ROM


TotO

1- You should load your code into the RAM to program the ROM
2- I can exchange your Winbond chip by a SST to see...
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

madram


[size=78%]1.It's not about programming the ROM itself. It's when any program in ROM write &AA in &D555, for display purpose typically.[/size]




2. I can have access to a SST-flavored X-Mem. I'll test it and keep you updated.
Thanks!

TotO

"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