bugs found on eo

Emulator and emulator development specific topics
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

bugs found on eo

Post by stefano »

I thought to post the most annoying problems I noticed:

- the memotech hrg board works well only on very old versions
- the microdrive cartridges can be easily destroyed on exit (file truncate at 0 bytes)
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: bugs found on eo

Post by Fruitcake »

stefano wrote: Fri Jan 18, 2019 12:04 am - the memotech hrg board works well only on very old versions
I am not familiar with the operation of the HRG board. Could you provide some more details on what doesn't work so well. If you could provide step-by-step instructions on what to do to replicate the problemsand explain how it should behave then that would be really helpful.

stefano wrote: Fri Jan 18, 2019 12:04 am the microdrive cartridges can be easily destroyed on exit (file truncate at 0 bytes)
Does this always happen or just sometimes? Again, any step-by-step instructions on how to reliably replicate the problem would be helpful.
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: bugs found on eo

Post by stefano »

correct. . I will try to describe step by step. For the memotech I should be able to produce a sample program.
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: bugs found on eo

Post by stefano »

forgot to mention : I think the memotech hrg bug was introduced long ago, the microdrive one could have always been present
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: bugs found on eo

Post by stefano »

The attached programs runs only on the old (original) EightyOne version 0.42(Test Z), and only with the NTSC mode disabled and M1NOT circuit disabled.

I hope I haven't mixed the files but it should be the same binary which worked on a real ZX81: https://www.z88dk.org/wiki/lib/exe/fetc ... mt_hrg.jpg

Other versions, especially when only the first 64 graphics lines are used and 32K RAM is chosen work also on recent EO versions.
There is probably also some bug on my code, possibly the emulator is doing everything correctly, but I noticed the difference and I wanted to point it out... as said it can be my fault, at the time I used the old EO as reference, then someone was testing my results on the real HW :roll:
Attachments
microman-mt-big.p
(8.61 KiB) Downloaded 271 times
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: bugs found on eo

Post by Fruitcake »

I ran it using 0.42z and 1.12 and it ran the same on both.

I noticed there is a small glitch at startup on both versions where it looks like an extra line is inserted right across the maze from the left tunnel to the right tunnel. The glitch is only momentary and shifts the maze down then back up. It makes me wonder whether the program is writing to the wrong part of memory. The glitch occurs at the start of each life. Might this be randomly crashing the game?

Here is the corruption caught on the game running on 1.12:
Microman.gif
Microman.gif (15.93 KiB) Viewed 7270 times

Some times the corruption is a solid black line, other times a few dots. But always across the line.

What difference do you see when running the game on 0.42z and 1.12?

I don't know how compatible the EightyOne.ini file is between the two versions so it might be worth making sure you delete it and let a new one be created.
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: bugs found on eo

Post by stefano »

you are right, the glitch exists, and has to do with my driver (I'm not sure why it happens, nor if it is visible on the real zx81).
also the frequencies are probably odd, I thought that my theories were right after the successful tests and the confirmation of the test on a real hardware (on a flat screen, though).. then the later EO versions don't show the picture at all
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: bugs found on eo

Post by XavSnap »

HI,

Is there any problems when the program is run twice on a real Memotech card?
This program is an asm code, and a bug can corrupt the card memory...
On the Xur, a second RUN display a bad UDG.

I had to test a french demo using the &0-&400 memory room, how we can switch it using an IRQ...
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: bugs found on eo

Post by XavSnap »

Got it !
Capture_memotech.PNG
There is a 1kb memory buffer in the HRG Memotech !
Located beatween &0 and &400.
It's use by the memotech rom to the display feature.

In EO, this inboard buffer is assigned by the HRG card, but, the user can't write it. (RO restrictions over the ROM)
If we POKE a value in this room, the buffer memory will be changed... [/WR set to 0 => set inboard buffer)
Capture_memotech2.PNG
It does...
RAND USR 16514 : Copy the ROM in the BUFFER (read ROM-refresh buffer!)
POKEs update the buffered rom (/WR redirected to the card!)

RAND USR 9346 : Init the HRG and set the memory buffer in RD stat... &0-&400 will be read, not the ROM.

IRQ $5F set to 2, the /RD read the buffer, not the monitor ROM...
(this IRQ assume 0,2 and 3. : bits 0 & 1)

The ROM/buffer trigger is located in the HRG ROM :

Code: Select all

ORG $2482 ; [@9346/@h2482]
Lb2482:
	LD A,$02 
	IN A,($5F) ; Memotech HRG mode.
	RET ; ==========================
Capture_memotech3.PNG
All the best...
FR.P
(3.73 KiB) Downloaded 262 times
Memo_Fr.bas
(3.14 KiB) Downloaded 272 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: bugs found on eo

Post by XavSnap »

Code: Select all

'// 5Fh - Memotech HRG card.
 If Port_ID = &H5F& And G_Card = eHiResMEMOTECH Then
 
 
' Debug.Print "Input Port MEMOTECH: "; Hex(port)

   If Mem_Display = 0 Then
               ' Clear display buffer.
               ClrMemory sLastScreen(0), 768
               
               ' Clear display buffer.
               ClrMemory gcBufferBits(0), 6528
               
               ' Clear Basic display.
                gpicDisplay.Cls
  End If
       
    
    Mem_Display = CByte(Int(port \ 256)) ' 0 for Basic Display, 2 for HRG buffer and 3 for Inverted display.
    If Mem_Display = 0 Then FrmMainWnd.DispHRGon Else FrmMainWnd.DispHRGoff
'    Bit0= 0=> Normal Basic Mode / 1=> Inverted Display.
'    Bit1= 0=> Rom (Set RomCs'=1) / 1=> Memotech buffer actived.(0h to 400h)

Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply