Proyecto ZX-Uno, clon de spectrum basado en FPGA

Si por algo se caracteriza el Spectrum es por su gran variedad de periféricos (clásicos y modernos)

Moderador: Sir Cilve Sinclair

zx_spectrum_plus3
Jack The Nipper
Mensajes: 185
Registrado: Mar Abr 17, 2007 12:32 pm

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por zx_spectrum_plus3 » Jue Feb 13, 2014 8:52 am

Hola.

Me he enterado hace poco del proyecto y por supuesto que me interesa. Sin embargo me ha surgido un par de dudas:
- Si en un futuro se podría programar para que implementara la ULA Plus. Entiendo que no debería haber problema... cuando cuando el proyecto esté finalizado. ¿Es así?
- Si es posible utilizar en la placa, para la alimentación, un conector mini USB en lugar del micro USB. El motivo es que este último es más endeble y delicado y en ocasiones resulta complicado fijar la conexión sin que quede bailonga.

Un saludo

armin666
rst 0
Mensajes: 24
Registrado: Lun Ene 27, 2014 1:19 pm

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por armin666 » Jue Feb 13, 2014 10:14 am

Hola,

Acabo de enterarme de este fantástico proyecto.
Me parece un gran trabajo el que estais haciendo, felicidades! :D

Si teneis previsto pedir más placas y componentes os agradecería que contarais conmigo.

Mientras tanto no pienso perderme nada!

Saludos,
Agus

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 280
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por cheveron » Dom Feb 23, 2014 3:34 pm

zx_spectrum_plus3 escribió:Hola.

Me he enterado hace poco del proyecto y por supuesto que me interesa. Sin embargo me ha surgido un par de dudas:
- Si en un futuro se podría programar para que implementara la ULA Plus. Entiendo que no debería haber problema... cuando cuando el proyecto esté finalizado. ¿Es así?
- Si es posible utilizar en la placa, para la alimentación, un conector mini USB en lugar del micro USB. El motivo es que este último es más endeble y delicado y en ocasiones resulta complicado fijar la conexión sin que quede bailonga.

Un saludo


It already does the full spec ULAplus with Timex video modes, which means it can use the SE Basic 4 firmware, giving you a proper 80-column mode for BASIC.
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 280
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por cheveron » Vie Mar 14, 2014 11:56 am

I've just heard from McLeod_IdeaFix that ZX-Uno is successfully running SE Basic IV. That means ZX-Uno is currently roughly equivalent of the Chloe 140SE: http://www.zxshed.co.uk/sinclairfaq/ind ... hloe_140SE

It shouldn't be much work to upgrade to the full Chloe 280SE specification: http://www.zxshed.co.uk/sinclairfaq/ind ... hloe_280SE

The Chloe 280SE is a rationalized version of the ZX Spectrum SE: http://www.zxshed.co.uk/sinclairfaq/ind ... pectrum_SE

Making the core compatible with the Chloe 280SE with SE Basic IV as the native firmware would enable the machine to run the following emulators in software without reprogramming the FPGA:

  • Acorn BBC B (unfinished)
  • Apple I
  • Commodore VIC-20
  • Compukit UK101
  • Galaksija
  • Jupiter Ace
  • Phillips Videopac G7000
  • Sinclair ZX80
  • Sinclair ZX81
  • Sinclair ZX Spectrum 16K
  • Sinclair ZX Spectrum 48K
  • Sinclair ZX Spectrum 128 (1985)
  • Sinclair ZX Spectrum 128 (1986)
  • Sinclair ZX Spectrum +2
  • Timex Computer TC2048
  • Timex Computer TC2068

TC2068 emulation provides access to the entire tape-based Timex library, and even some of the ROM software on WoS: http://www.worldofspectrum.org/tmx/

It would also enable timing correct running of IF2 and MikroPlus cartridges (the +3 has the lower 16K of RAM contended in all-RAM mode):

  • Shadow of the Unicorn
  • Gyruss
  • Panama Joe
  • Popeye
  • Q*Bert
  • Death Star Battle
  • Star Wars
  • Loco Motion
  • Montezuma's Revenge
  • Space Raiders
  • Chess
  • Planetoids
  • Hungry Horace
  • Backgammon
  • Horace and the Spiders
  • Jet Pac
  • Pssst
  • Tranz Am
  • Cookie

If a Chloe 280SE core is made available for the ZX-Uno then I might consider having a go at fixing the bugs in SE Basic 4.1, or at least back-porting some of the functionality to v4.0.

There's a discussion on WoS at the moment about building a Loki, but to be honest I think ZX-Uno + a Chloe 280SE core would be a much better idea: http://www.worldofspectrum.org/forums/s ... hp?t=46911
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
antoniovillena
Nonamed
Mensajes: 1164
Registrado: Dom Ene 09, 2011 8:55 am

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por antoniovillena » Sab Mar 29, 2014 8:25 pm

Andrew escribió:Unfortunately, extending BASIC to a 64 column mode requires almost as much work as an 80 column mode. Double height characters really need double width stems. That's why the font on the BBC Micro is bold. But bold characters don't look as good with normal resolution, so you'd either have to compromise or you'd still need two fonts. If I've understood your proposed mode correctly, what you're doing is displaying the normal and shadow video side by side. So yes, you could use the normal routines to write to the left half of the screen. But they would need modifying to write to the right half of the screen. So you make a change to assume the screen is at 0xC000 and page it in before doing any screen writes and out again afterwards. The print code still only handles 32 columns (for backwards compatibility). So if you want to print text across more than 32 columns you have to keep track of the print position is. And you can't use the mode for editing BASIC in 64 columns, which is the main thing I think people will use 80 column mode for.


The font is not as good as a special one designed for this width, but I think that it's more readable than 6x8 one (of course we are at 64 column, not 80).

Yes, the print routine will be not 100% backwards compatible. If we surpases the right edge of the 32 columns screen the new code must "change" to the second screen.

Of course you can edit BASIC in 64 columns, this require some modifications in the source code to allow editing in both 32 and 64 columns.
Imagen

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 280
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por cheveron » Sab Mar 29, 2014 11:40 pm

[quote=antoniovillena]De acuerdo. Entonces usamos los foros de speccy.org. Creo que es un tema que puede interesar a otras personas, quizás no a muchas, pero que se lo perderían si lo hablamos por privado.[/quote]

I agree, I'd rather have a public discussion as it may inspire someone to come up with their own ideas. Most of the developments in the Speccy scene that interest me are happening in Spain, which is why I joined this forum in the first place. I don't want to get involved in language politics, but I wish other forums were as pleasant and enlightened as this one.

The font is not as good as a special one designed for this width, but I think that it's more readable than 6x8 one (of course we are at 64 column, not 80).


That depends. I've tried SE Basic IV on Fuse on the Raspberry Pi, output from the composite connector to an HD television and stretched from 3:4 to 16:9. At that point it's very readable and provides a nice useable 80x24 display.

Yes, the print routine will be not 100% backwards compatible. If we surpases the right edge of the 32 columns screen the new code must "change" to the second screen. Of course you can edit BASIC in 64 columns, this require some modifications in the source code to allow editing in both 32 and 64 columns.


It's worse than that. You've got the system variables to think about. If you change them to support a 64 column screen (required for editing a BASIC line) then they won't work for a 32 column screen. So you're back to the choice of branching, which will slow the code down, using two different versions of the ROM, or limiting the edit line to 32 columns.

The simplest way to print across two screens would be to use one of the spare flag bits to determine if text should run over. If it is set then you can change the screen to write to (store that in another flag bit). But then you still have to deal with reading two flags to figure out if you need to run over, and which screen to write to before doing the page, writing to the screen and restoring the previous paging. And you're writing attributes as well. I would be surprised if that wasn't slower than my 80 column mode.

On the other hand, if you want to fork SE Basic and have a go at it then I'll offer whatever support I can.
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
antoniovillena
Nonamed
Mensajes: 1164
Registrado: Dom Ene 09, 2011 8:55 am

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por antoniovillena » Dom Mar 30, 2014 4:08 am

Writing a 8x8 cell is very fast. The main part of the code is 124 cycles.

Código: Seleccionar todo

        pop     de
        ld      (hl), e
        inc     h
        ld      (hl), d
        inc     h
        pop     de
        ld      (hl), e
        inc     h
        ld      (hl), d
        inc     h
        pop     de
        ld      (hl), e
        inc     h
        ld      (hl), d
        inc     h
        pop     de
        ld      (hl), e
        inc     h
        ld      (hl), d


I doubt that a 6x8 cell routine (without prerotating fonts) can do this in less than 500 cycles.
Imagen

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 280
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por cheveron » Dom Mar 30, 2014 3:38 pm

antoniovillena escribió:Writing a 8x8 cell is very fast. The main part of the code is 124 cycles. I doubt that a 6x8 cell routine (without prerotating fonts) can do this in less than 500 cycles.


In the worst case scenario rotating only costs 64 cycles. In the best case scenario it costs 16 cycles. There's also a slight overhead of doing a table lookup to figure out which of the eight entry points in the print routine will be used but that adds only about 10 cycles. So across all print positions it averages out to an additional 50 cycles per character. Certainly nowhere near 500.

With your proposed mode the code will still need to juggle the stack and do paging to write to the second screen. it will need to check a bit to see if 64 column mode is enabled and another bit to see which screen it's supposed to be writing to. Then for each character it needs to branch to the correct screen code (unless you use multiple ROMs), at which point I doubt it will be much faster than SE Basic IV's 80 column mode.
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
antoniovillena
Nonamed
Mensajes: 1164
Registrado: Dom Ene 09, 2011 8:55 am

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por antoniovillena » Dom Mar 30, 2014 5:15 pm

I have tried your 6x8 column routine in the ZXODUS demo with the two next breakpoints:

Código: Seleccionar todo

9BCC
9C3C


And takes 9194 cycles for each character. That is after removing the address calculation part (both screen and font table). That is very far from the worst scenario pointed, 124+64 cycles
Imagen

Z80user
Manic Miner
Mensajes: 215
Registrado: Vie Jun 08, 2007 9:42 am
Ubicación: En un lugar de la mancha
Contactar:

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por Z80user » Dom Mar 30, 2014 6:13 pm

4.565 characters per second this is the speed of my routine.
I only used 8 bytes/character and I used RRA instruction also. This was the top speed than I get. I dont thing this can enhancement much more.
The rutine have 4 speed
HHHHHH00
XXHHHHHH
XXXXHHHH HH000000
XXXXXXHH HHHH0000

I only don't take care of the next character in a line, it will be deleted but not the previous character.

I get 3100 t-states to print 4 characters 3100/4=775 t-states/character

Enviado desde mi GT-N7100 mediante Tapatalk
Si vas a tirar Hardware, primero pregunta si alguien lo puede recuperar.
No abandones un ordenador en un vertedero, donalo a alguien.

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 280
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por cheveron » Dom Mar 30, 2014 6:18 pm

antoniovillena escribió:I have tried your 6x8 column routine in the ZXODUS demo with the two next breakpoints:

Código: Seleccionar todo

9BCC
9C3C


And takes 9194 cycles for each character. That is after removing the address calculation part (both screen and font table). That is very far from the worst scenario pointed, 124+64 cycles


Well if you pick the most inefficient 6x8 code I've ever published you're going to get bad results. :)

SE Basic IV does not use that routine. Unfortunately you're not going to be able to do the timing tests on it because Fuse and EightyOne don't support those kind of tests, and no other emulators support the mode.

80 column mode does feel a bit slower compared to 32 column mode in SE Basic IV, but that's mostly because 32 column mode is so much faster than the original ROM. If you compare 80 column mode and the original ROM next to each other, 80 column mode is faster.
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
antoniovillena
Nonamed
Mensajes: 1164
Registrado: Dom Ene 09, 2011 8:55 am

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por antoniovillena » Dom Mar 30, 2014 6:42 pm

In both modes (256x192 and 512x192) printing a 6x8 font without prerotating is a lot slower that printing a 8x8 one. This is like tiles/sprites. You can't pretend to do a sprite painting routine as fast as a tile one.

Z80user can you show your routine?
Imagen

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 280
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por cheveron » Dom Mar 30, 2014 6:42 pm

Z80user escribió:4.565 characters per second this is the speed of my routine.
I only used 8 bytes/character and I used RRA instruction also. This was the top speed than I get. I dont thing this can enhancement much more.
The rutine have 4 speed
HHHHHH00
XXHHHHHH
XXXXHHHH HH000000
XXXXXXHH HHHH0000

I only don't take care of the next character in a line, it will be deleted but not the previous character.

I get 3100 t-states to print 4 characters 3100/4=775 t-states/character

Enviado desde mi GT-N7100 mediante Tapatalk


My routine clears the area under the character to be printed. Counting from when the routine reads the first byte to be overwritten to when it writes the final byte back to the screen, in the worst case takes 138 t-states per line or 1104 t-states per character. In practice it takes longer than this because it deals with INVERSE and OVER and keeping track of the print position, and line wrapping and so on. But it's still very fast.
«Dime con quién andas, y te diré quién eres» — Cervantes

Avatar de Usuario
antoniovillena
Nonamed
Mensajes: 1164
Registrado: Dom Ene 09, 2011 8:55 am

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por antoniovillena » Dom Mar 30, 2014 6:45 pm

And cheveron, can you tell me what is your more efficient 6x8 routine to do the comparision?
Imagen

Avatar de Usuario
cheveron
Manic Miner
Mensajes: 280
Registrado: Lun Jun 28, 2010 6:14 pm
Ubicación: Londres
Contactar:

Re: Proyecto ZX-Uno, clon de spectrum basado en FPGA

Mensaje por cheveron » Dom Mar 30, 2014 6:46 pm

antoniovillena escribió:In both modes (256x192 and 512x192) printing a 6x8 font without prerotating is a lot slower that printing a 8x8 one. This is like tiles/sprites. You can't pretend to do a sprite painting routine as fast as a tile one.

Z80user can you show your routine?


https://github.com/cheveron/sebasic4/bl ... ommand.asm
«Dime con quién andas, y te diré quién eres» — Cervantes

Responder

¿Quién está conectado?

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