Autor Wątek: AVR ZX Spectrum  (Przeczytany 23391 razy)

Lisitsin

  • *
  • Wiadomości: 10
AVR ZX Spectrum
« dnia: 2014.12.15, 10:16:42 »
Hello!
Sorry, can write only english (i am russian)
Gald to present you my own development - ZX Spectrum, based on AVR microcontrollers Atmel.
Device is fully compartable with all of ZX mashines.
Heare you can see:
https://www.youtube.com/watch?v=y4JQdIvJunI - Video, my presentation of device, but russian version
https://www.youtube.com/watch?v=xDgPE6_XmFs - Video, how it works
http://meandr.org/archives/21451 - more details
http://zx-pk.ru/showthread.php?t=23671 - Forum
https://dl.dropboxusercontent.com/u/12408899/V2_0%20support.zip - Technical information

Hope it will be intereresting for you. Please, comment heare. Answer you questions. To obtain device mail me.
Thank you !!!


matofesi

  • *****
  • Wiadomości: 2048
  • Miejsce pobytu:
    Toruń/Poland
Odp: AVR ZX Spectrum
« Odpowiedź #1 dnia: 2014.12.15, 10:53:31 »
Am I right to understand that it's not really a clone but an emulator written for AVR with extra hardware for I/O? If so - how accurate is the emulation (because previous attempts to do Spectrum on AVR failed miserably in this area)? One of the hard-core timings test would be to run some demos - preferably second part of Shock - if it runs ok then the job was really well done :)


Lisitsin

  • *
  • Wiadomości: 10
Odp: AVR ZX Spectrum
« Odpowiedź #2 dnia: 2014.12.15, 11:45:55 »
You are right, device uses emulation as working conception.
Device passes tests like Zexall, AUMT, Testprog. Z80tests pass with MEMPTR test, but few tests like IN A,R and BIT(HL) fails. Timing tests is a question, cose test, for example, TIMING just stop.
Such demo programs, like Vibrate is working all right
« Ostatnia zmiana: 2014.12.15, 12:18:05 wysłana przez Lisitsin »

matofesi

  • *****
  • Wiadomości: 2048
  • Miejsce pobytu:
    Toruń/Poland
Odp: AVR ZX Spectrum
« Odpowiedź #3 dnia: 2014.12.15, 12:47:30 »
Ok. I see on the project page it can run Spectrum 48/128 software - can you try running this: http://www.worldofspectrum.org/infoseekid.cgi?id=0007726 in 48 mode, then skip to second part and post some screenshot or short video. This is a real video-timings compatibility test you need to pass ;)

Lisitsin

  • *
  • Wiadomości: 10
Odp: AVR ZX Spectrum
« Odpowiedź #4 dnia: 2014.12.15, 17:23:59 »
Heare it is:
http://youtu.be/QIB9uuW0oDw.
But after pressing "Space" it goes to Basic, as at AVR ZX and Spectaculator

matofesi

  • *****
  • Wiadomości: 2048
  • Miejsce pobytu:
    Toruń/Poland
Odp: AVR ZX Spectrum
« Odpowiedź #5 dnia: 2014.12.16, 07:12:40 »
It "goes to BASIC" because it's not supposed to be loaded from 128 menu. You should load it in 48 mode or in USR 0 mode on 128. And the important part is the second one - you can safely skip the first ;)

Lisitsin

  • *
  • Wiadomości: 10
Odp: AVR ZX Spectrum
« Odpowiedź #6 dnia: 2014.12.16, 16:42:55 »
O key, i`ve recordet it, running part by part: http://youtu.be/lL3-WloUAGE.

trojacek

  • *****
  • Wiadomości: 6831
  • Miejsce pobytu:
    Warszawa
Odp: AVR ZX Spectrum
« Odpowiedź #7 dnia: 2014.12.16, 16:48:09 »
Compare with this:

https://www.youtube.com/watch?v=MllVhsN6MG0

I hate to say that your soultion does not keep the right video timings...


matofesi

  • *****
  • Wiadomości: 2048
  • Miejsce pobytu:
    Toruń/Poland
Odp: AVR ZX Spectrum
« Odpowiedź #8 dnia: 2014.12.16, 17:20:13 »
It's exactly as I thought it will be. I'm almost certain that AVRs are simply not powerfull enough to emulate both CPU and ULA with all correct timings. But it would be really interesting to be proven wrong ;)

I'm sure your device might be fine for gaming etc. but as I'm mostly demo coder and it's not for me at this stage. But if you actually manage to do a cycle-exact version then I might be interested :)

Keep a good work anyway as it looks nice for some uses :)

Lisitsin

  • *
  • Wiadomości: 10
Odp: AVR ZX Spectrum
« Odpowiedź #9 dnia: 2014.12.16, 17:23:14 »
Yes, timings not holhed, but it can be corrected. is written in assembler language, and every instruction have enough time to be corrected

Lisitsin

  • *
  • Wiadomości: 10
Odp: AVR ZX Spectrum
« Odpowiedź #10 dnia: 2014.12.16, 17:27:47 »
Additionally, videoCPU and central proceccor are different microcontrollers, so timings can be corrected independently.

trojacek

  • *****
  • Wiadomości: 6831
  • Miejsce pobytu:
    Warszawa
Odp: AVR ZX Spectrum
« Odpowiedź #11 dnia: 2014.12.16, 17:32:09 »
IMHO, if you really want to make AVR to keep ZX timings, you'd better use any INT input and trigger it with the pixel clock divided by 224.

Lisitsin

  • *
  • Wiadomości: 10
Odp: AVR ZX Spectrum
« Odpowiedź #12 dnia: 2014.12.16, 18:49:59 »
Interrupts is too long to exequte: 4 cycles to make interrupt, 4 cycles to return, 1 cycle to save status register ... For example, in my emulator fetch/decode/test for masked interrupt/increment R/jump to emulation routine is total 18 clock cycles. If it will be longer then 18 cycles system will be work slower.

trojacek

  • *****
  • Wiadomości: 6831
  • Miejsce pobytu:
    Warszawa
Odp: AVR ZX Spectrum
« Odpowiedź #13 dnia: 2014.12.16, 19:15:11 »
Of course, if you find a software solution for this, it will be better (and cheaper).
I don't know exactly why your AVR produces inexact timings, but I would suggest you reading this page:

http://www.zxdesign.info/vidparam.shtml

and then the part "contended memory" of this document:

http://www.worldofspectrum.org/faq/reference/48kreference.htm

Lisitsin

  • *
  • Wiadomości: 10
Odp: AVR ZX Spectrum
« Odpowiedź #14 dnia: 2014.12.16, 19:38:42 »
Very interesting! But most technical information i`v read in russian magazine "Radio". It was written about AVR ZX Spectrum too: https://dl.dropboxusercontent.com/u/12408899/Radio.zip
« Ostatnia zmiana: 2014.12.16, 19:51:28 wysłana przez Lisitsin »