Avances en el desarrollo del ZX-Uno

Sinclair QL, ZX81, +2, +3, 128K ...
Avatar de Usuario
aowen
Commodore 128
Commodore 128
Mensajes: 90
Registrado: 14 Mar 2014, 14:31
Sistema Favorito: Spectrum +2
primer_sistema: Spectrum +2
consola_favorita: Nintendo GameBoy
Primera consola: Nintendo GameBoy

Re: Avances en el desarrollo del ZX-Uno

Mensajepor aowen » 25 Mar 2014, 16:01

mcleod_ideafix escribió:
aowen escribió:What's the behavior with the original ROM and divMMC NMI switched off? The only thing I've got to test against is the ZX Spectrum SE emulation in Fuse with divIDE, but I'll see if I can get that running and do some tests.

It works. The NMI resets the computer (as it is expected with the Sinclair ROM if you don't poke the NMI_ADDR system var). dot commands (.cd, .ls) work. .tapein works, and LOAD "" loads the program selected with .tapein with no issues.


I'll have to get a test environment up and look at it in the debugger. Unfortunately I can't get hdfmonkey to compile at the moment and there doesn't seem to be an OS X binary available.

Avatar de Usuario
mcleod_ideafix
Amiga 2500
Amiga 2500
Mensajes: 5316
Registrado: 06 Oct 2009, 04:12
Sistema Favorito: Spectrum 16Kb/48Kb
primer_sistema: Spectrum 16Kb/48Kb
consola_favorita: Vectrex
Primera consola: TV Games/Pong Clone
Ubicación: Jerez de la Frontera
Gracias dadas: 12 veces
Gracias recibidas: 54 veces
Contactar:

Re: Avances en el desarrollo del ZX-Uno

Mensajepor mcleod_ideafix » 25 Mar 2014, 16:31

While you are on that, I'm seeing something weird here...

DIVMMC / DivIDE traps allow the CPU to read the first byte of the trapped address from the main ROM (during the M1 cycle), and then, while in the refresh period of the current M1 cycle, ROMs are switched and the following bytes are read/executed from the ESXDOS ROM. At least, this is what I read from VELESOFT docs and others.

This works, at least with the Sinclair ROM. But I've just seen something funny: traps at $0000, $0038, $04C2 and $0562 (RESET, INT IM1, SAVE, LOAD) replicate the same byte of instruction that is present in the Sinclair ROM, so these traps would work either if I map ESXDOS during the very M1 cycle, just before reading the byte (which would be read from ESXDOS), or if I map it after the byte is read, during the refresh cycle. Either case, the byte read is the same.

Traps at $0008 and $0066 (ERROR, NMI) are different: the NMI trap has a RET instruction at address $0066 in ESXDOS ROM. This is, as I read, to avoid nesting NMI petitions that might trash the stack. As the ESXDOS ROM is mapped in after the byte from $0066 is read, the first time $0066 is reached, the NMI handler is executed because the byte read and executed from address $0066 is not RET, because it has been read from the main ROM. If during its execution, an spurious NMI signal is triggered again, it will execute $0066 again, but this time from ESXDOS ROM, which has a RET instruction at this address, returning inmediately to where it came from. So, for $0066 trap, it's not the same if I map ESXDOS in during the M1 cycle or during the refresh cycle. It has to be mapped in after the byte has been read in the M1 cycle.

And, finally, for the $0008 trap: this trap begins with a multibyte instruction, which is LD HL,($5C5D) (store current value of CH_ADD pointer into HL) in the Sinclair ROM (and SE Basic IV), and a totally different instruction in ESXDOS: JP $0985

If I map ESXDOS during the refresh cycle, as I'm doing now, the instruction read by the CPU is: LD HL,($0985) ... which doesn't make sense, as $0985 is an address within the first 8K, so it's ROM, so its contents cannot vary.
But if I map ESXDOS during the M1 cycle, before the first instruction is read, the instruction executed is JP $0985, which may have sense.
It can also make sense if I decide to map ESXDOS in, not during the refresh period of the current M1 cycle, but at the beginning of the next M1 cycle following this. In other words, if I map ESXDOS in after the current instruction is completely read and executed.

Well... after this tech chitchat, what I'm going to try is to change the DIVMMC module so traps at $0000, $0008, $0038, $04C2 and $0562 will cause ESXDOS ROM to map inmediately, as it is being done with TRDOS traps, while the trap at $0066 will cause a delayed ESXDOS mapping in as it is currently being done.


EDIT: changed, not worked neither with the Sinclair ROM, nor SE Basic IV.
Recuerda: cada vez que se implementa un sistema clásico en FPGA, Dios mata a un purista

Avatar de Usuario
aowen
Commodore 128
Commodore 128
Mensajes: 90
Registrado: 14 Mar 2014, 14:31
Sistema Favorito: Spectrum +2
primer_sistema: Spectrum +2
consola_favorita: Nintendo GameBoy
Primera consola: Nintendo GameBoy

Re: Avances en el desarrollo del ZX-Uno

Mensajepor aowen » 25 Mar 2014, 18:35

Interesting. You could also try OpenSE BASIC 3.x. If that works then it will give me some ideas of what might be causing the issue. I've given up trying to get hdfmonkey to compile. Does anyone know how to build hdfmonkey on OS X? I've installed Homebrew and autoconf and the dependencies but it keeps complaining there's no Makefile.in in the src folder.

Avatar de Usuario
radastan
Amiga 2500
Amiga 2500
Mensajes: 4542
Registrado: 11 Jun 2007, 19:29
Sistema Favorito: Spectrum 16Kb/48Kb
primer_sistema: Spectrum 16Kb/48Kb
consola_favorita: Sega Genesis/Megadrive
Primera consola: TV Games/Pong Clone
Ubicación: Córdoba
Gracias dadas: 9 veces
Gracias recibidas: 40 veces
Contactar:

Re: Avances en el desarrollo del ZX-Uno

Mensajepor radastan » 25 Mar 2014, 21:08

Un resumencillo así tonto: en Semana Santa pretendo soldar el ZX Uno. ¿merece la pena o espero a la siguiente revisión?. Tened en cuenta que ando de tiempo escaso y si luego no va a funcionar bien o va a dar muchos problemas prefiero guardar los componentes y esperar a la placa revisada.
Yo tengo una máquina del tiempo, se llama ZX Spectrum, siempre me devuelve a los buenos momentos.
(\.../) (\.../) (\.../) (\.../)
( *.*) ('.'= ) ('.'= ) ('.'= )
(")_(") (")_(") (")_(") (")_(")
╔═══╦═══╦═══╦══╦══╗
║╔═╗║╔═╗║╔═╗╠╣╠╩╣╠╝
║║─║║╚══╣║─╚╝║║─║║
║╚═╝╠══╗║║─╔╗║║─║║
║╔═╗║╚═╝║╚═╝╠╣╠╦╣╠╗
╚╝─╚╩═══╩═══╩══╩══╝

Avatar de Usuario
antoniovillena
Amiga 1200
Amiga 1200
Mensajes: 2013
Registrado: 16 Abr 2012, 21:22
Gracias recibidas: 8 veces

Re: Avances en el desarrollo del ZX-Uno

Mensajepor antoniovillena » 25 Mar 2014, 21:21

Si te puedes hacer con una FPGA XC6SLX9 y una Flash W25Q80 por tu cuenta te puedes esperar. El resto de componentes te valen. El problema es que para que salga barato tengo que pedir las cosas de 10 en 10. No puedo pedir 11 FPGAs ni 11 Chips de Flash.

Avatar de Usuario
mcleod_ideafix
Amiga 2500
Amiga 2500
Mensajes: 5316
Registrado: 06 Oct 2009, 04:12
Sistema Favorito: Spectrum 16Kb/48Kb
primer_sistema: Spectrum 16Kb/48Kb
consola_favorita: Vectrex
Primera consola: TV Games/Pong Clone
Ubicación: Jerez de la Frontera
Gracias dadas: 12 veces
Gracias recibidas: 54 veces
Contactar:

Re: Avances en el desarrollo del ZX-Uno

Mensajepor mcleod_ideafix » 25 Mar 2014, 21:25

aowen escribió:Interesting. You could also try OpenSE BASIC 3.x. If that works then it will give me some ideas of what might be causing the issue.

It doesn't work :( OpenSE Basic 3.1.2 does the same things as SE Basic IV.
Recuerda: cada vez que se implementa un sistema clásico en FPGA, Dios mata a un purista

Avatar de Usuario
antoniovillena
Amiga 1200
Amiga 1200
Mensajes: 2013
Registrado: 16 Abr 2012, 21:22
Gracias recibidas: 8 veces

Re: Avances en el desarrollo del ZX-Uno

Mensajepor antoniovillena » 25 Mar 2014, 21:28

Puedo jugar con los lotes para que te salga más barato. Por ejemplo con 1 lote del primer enlace y 2 del segundo enlace conseguimos los 11, pero tendrías que pagar la diferencia:

http://www.aliexpress.com/item/5pcs-lot ... 98378.html
http://www.aliexpress.com/item/Free-Shi ... 08853.html

Serían $86.60-$74= $12.60. Te saldría por $12.60 (en lugar de los $7.40 del resto). Si no lo consigues por menos de $12.60 podemos hacerlo así.

-- Actualizado 25 Mar 2014, 21:36 --

En cuanto a la Flash puedo pedir los 20 del primer enlace restando lo que cuesta en el segundo enlace:
http://www.aliexpress.com/item/W25Q80-S ... 68841.html
http://www.aliexpress.com/item/Free-shi ... 80590.html

Te sale a 9-5.93= $3.07. Al resto de la gente le sale a $0.60 pero se llevan 1 chip, tú te llevarías 10 (te sale a la mitad cada uno)

Avatar de Usuario
aowen
Commodore 128
Commodore 128
Mensajes: 90
Registrado: 14 Mar 2014, 14:31
Sistema Favorito: Spectrum +2
primer_sistema: Spectrum +2
consola_favorita: Nintendo GameBoy
Primera consola: Nintendo GameBoy

Re: Avances en el desarrollo del ZX-Uno

Mensajepor aowen » 25 Mar 2014, 23:37

mcleod_ideafix escribió:
aowen escribió:Interesting. You could also try OpenSE BASIC 3.x. If that works then it will give me some ideas of what might be causing the issue.

It doesn't work :( OpenSE Basic 3.1.2 does the same things as SE Basic IV.


Then the problem is almost certainly with divMMC as OpenSE BASIC 3.x was tested extensively against divIDE. On the other hand it wasn't tested by me so don't take it as read that that's the source of the problem. The good news is I have got hdfmonkey to build (turns out there was a file missing from the git repo but Gasman has fixed that now). So soon I will have a working test environment.

Avatar de Usuario
mcleod_ideafix
Amiga 2500
Amiga 2500
Mensajes: 5316
Registrado: 06 Oct 2009, 04:12
Sistema Favorito: Spectrum 16Kb/48Kb
primer_sistema: Spectrum 16Kb/48Kb
consola_favorita: Vectrex
Primera consola: TV Games/Pong Clone
Ubicación: Jerez de la Frontera
Gracias dadas: 12 veces
Gracias recibidas: 54 veces
Contactar:

Re: Avances en el desarrollo del ZX-Uno

Mensajepor mcleod_ideafix » 25 Mar 2014, 23:43

aowen escribió:Then the problem is almost certainly with divMMC as OpenSE BASIC 3.x was tested extensively against divIDE

But... DivIDE with Fatware or with ESXDOS? And remember that ESXDOS for DivIDE is not the same as ESXDOS for DIVMMC, I mean, ROMs are not interchageable.
Recuerda: cada vez que se implementa un sistema clásico en FPGA, Dios mata a un purista

Avatar de Usuario
aowen
Commodore 128
Commodore 128
Mensajes: 90
Registrado: 14 Mar 2014, 14:31
Sistema Favorito: Spectrum +2
primer_sistema: Spectrum +2
consola_favorita: Nintendo GameBoy
Primera consola: Nintendo GameBoy

Re: Avances en el desarrollo del ZX-Uno

Mensajepor aowen » 26 Mar 2014, 00:30

mcleod_ideafix escribió:
aowen escribió:Then the problem is almost certainly with divMMC as OpenSE BASIC 3.x was tested extensively against divIDE

But... DivIDE with Fatware or with ESXDOS? And remember that ESXDOS for DivIDE is not the same as ESXDOS for DIVMMC, I mean, ROMs are not interchageable.


Well the good news is that I'm getting the same behavior with esxDOS 0.8.5 for divIDE running on the emulated ZX Spectrum SE with SE Basic 4.0.5. Without an actual ZX-Uno board this is all I can test against. However, because the behavior is exactly what you have reported I believe a fix that gets it working on the divIDE / ZX Spectrum SE should also work for the divMMC / Chloe 280SE. The bad news is I don't know what the cause of the problem is. The good news is that it does just seem to be the tape handling that is affected which hopefully isolates the problem to the tape code. It would be good to know exactly what esxDOS is doing, but unfortunately it's closed source and I don't really feel like trying to work it out from an uncommented disassembly.


Volver a “Sinclair/Spectrum”

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 3 invitados