Page 1 of 2

bugs found on eo

Posted: Fri Jan 18, 2019 12:04 am
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)

Re: bugs found on eo

Posted: Sat Jan 19, 2019 9:44 pm
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.

Re: bugs found on eo

Posted: Sat Jan 19, 2019 11:42 pm
by stefano
correct. . I will try to describe step by step. For the memotech I should be able to produce a sample program.

Re: bugs found on eo

Posted: Sat Jan 19, 2019 11:45 pm
by stefano
forgot to mention : I think the memotech hrg bug was introduced long ago, the microdrive one could have always been present

Re: bugs found on eo

Posted: Mon Jan 21, 2019 3:34 pm
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:

Re: bugs found on eo

Posted: Tue Jan 22, 2019 11:53 pm
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 7272 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.

Re: bugs found on eo

Posted: Sat Mar 02, 2019 10:16 pm
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

Re: bugs found on eo

Posted: Mon Mar 04, 2019 3:14 pm
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...

Re: bugs found on eo

Posted: Mon Mar 04, 2019 3:57 pm
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

Re: bugs found on eo

Posted: Mon Mar 04, 2019 8:24 pm
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)