1

Topic: New bug in 0.8.6 TRDOS emulation

This bug shows up in 0.8.6 but works fine in 0.8.5.

In 0.8.6, the pentagon trdos demo kpack deluxe:
http://www.pouet.net/prod.php?which=66295

crashes in the isometric snake part:
https://youtu.be/NZxw7NseHyI?t=289

I traced this back to the last disk load prior to this part running and verified the problem is in the trdos emulation by successfully running the demo using 0.8.5.  The last disk load does not doing anything unusual; it's just using service #5 via a call through $3d13 so if this is where the bug is, it may be affecting other trdos programs.

I'm running on a zx next in pentagon mode but this could also be tested on an uno.

2

Re: New bug in 0.8.6 TRDOS emulation

Hello,
from my point of view this problem is consequence of incorrect port #7FFD addressing in second part of demo.
At address #9E5B of demo code I have found sequence (https://www.dropbox.com/s/toonn5x9l6yne … u.png?dl=0) :

  XOR 08
  OUT (#FD),A   ; now A = #17 so OUT will activate port #1FFD if this port exists : in Pentagon not but in +2A "derivates" yes and result is ALLRAM mode ...

The demo works on classic 128 and +2 too (slowly and visually poorly than on Pentagon but works ...), I have tested demo in FUSE emulator + divMMC + ESXDOS 0.8.6 ...

3 (edited by Alcoholics Anonymous 2018-11-19 02:22:25)

Re: New bug in 0.8.6 TRDOS emulation

The port decoding shouldn't be a problem.  In the next, pentagon mode uses different port decoding for port 0x7ffd and disables port 0x1ffd.  Port 0xdffd is still enabled but I have tried a build with port 0xdffd disabled and that didn't make a difference.

+-+-++-------------------+---------+--------------------------------+-------------------
| | ||AAAA AAAA AAAA AAAA|         |                                |
| | ||1111 1100 0000 0000|         |                                |
|R|W||5432 1098 7654 3210|Port(hex)|Description                     |Disable
+-+-++-------------------+---------+--------------------------------+-------------------
| |*||0XXX XXXX XXXX XX01| 0x7ffd  |ZX Spectrum 128 memory          |Port 0x7ffd bit 5
| |*||01XX XXXX XXXX XX01| 0x7ffd  |ZX Spectrum 128 memory +3 only  |Port 0x7ffd bit 5
| |*||1101 XXXX XXXX XX01| 0xdffd  |ZX Spectrum 128 memory          |Port 0x7ffd bit 5

The demo runs properly in pentagon mode to completion when using esxdos 0.8.5 so there must be something different in the TRDOS emulation of 0.8.6.

Do you mind doublechecking that you're running release 0.8.6 in fuse?  Or maybe esxdos itself is doing some port io besides sd card access as it did with the turbo register on another machine?

4

Re: New bug in 0.8.6 TRDOS emulation

>you're running release 0.8.6 in fuse?
without doubt ... ;-)

I tested it on real HW (divIDE + ESXDOS 0.8.6 +  ZX128) too with positive result (i.e. without problem) ...

I don't know exact meaning of table in your post but :
if
1101 XXXX XXXX XX01 means "allowed access to #DFFD port"
and
01XX XXXX XXXX XX01 means "allowed access to #7FFD port"
then
0XXX XXXX XXXX XX01 means "allowed access to #7FFD, #3FFD, #1FFD ports"

So, shouldn't be first definition in table removed from table ?

5

Re: New bug in 0.8.6 TRDOS emulation

In pentagon mode the port decoding is this:

+-+-++-------------------+---------+--------------------------------+-------------------
| | ||AAAA AAAA AAAA AAAA|         |                                |
| | ||1111 1100 0000 0000|         |                                |
|R|W||5432 1098 7654 3210|Port(hex)|Description                     |Disable
+-+-++-------------------+---------+--------------------------------+-------------------
| |*||0XXX XXXX XXXX XX01| 0x7ffd  |ZX Spectrum 128 memory          |Port 0x7ffd bit 5
| |*||1101 XXXX XXXX XX01| 0xdffd  |ZX Spectrum 128 memory          |Port 0x7ffd bit 5

The +3 ports are disabled.

There is a lot of other hw present on the zx next, of course, but since the demo works in 0.8.5, 0.8.6 must be OUTing to another port that 0.8.5 doesn't.  The problem can't be in the demo itself.

Previous versions of esxdos did OUT to extra ports to enable turbo mode on other hw (the zx prism I think?) so I'm wondering if 0.8.6 is doing more extraneous port i/o not connected to the sd card or divmmc control that might be conflicting with other next hardware?

If this is not known maybe the only way to find out is to modify fuse to record all unique port accesses to a file to have a look.

6

Re: New bug in 0.8.6 TRDOS emulation

Hi,

Alcoholics Anonymous wrote:

There is a lot of other hw present on the zx next, of course, but since the demo works in 0.8.5, 0.8.6 must be OUTing to another port that 0.8.5 doesn't.

This part of the code wasn't changed at all.

Alcoholics Anonymous wrote:

Previous versions of esxdos did OUT to extra ports to enable turbo mode on other hw (the zx prism I think?) so I'm wondering if 0.8.6 is doing more extraneous port i/o not connected to the sd card or divmmc control that might be conflicting with other next hardware?

If this is not known maybe the only way to find out is to modify fuse to record all unique port accesses to a file to have a look.

The OUT was to enable the turbo mode of the ZX-One FPGA core (V6Z80P), but the new version of the core doesn't use this method anymore.

The issue with this demo is related to the built-in TR-DOS Navigator (which wasn't bundled in v0.8.5) and not to esxDOS. Run it from the TR-DOS prompt and it will run just fine.

7

Re: New bug in 0.8.6 TRDOS emulation

Cheers, that was exactly it.  I successfully ran the demo under 0.8.6 by manually mounting the trd image and running from basic.