Shop OBEX P1 Docs P2 Docs Learn Events
Spectrum Emulator ( now with SNA file selector ) - Page 3 — Parallax Forums

Spectrum Emulator ( now with SNA file selector )

13

Comments

  • BaggersBaggers Posts: 3,019
    edited 2010-05-29 15:13
    pullmoll, in JetPac it's started in joystick mode, you have to press 3 to select keyboard mode [noparse]:D[/noparse] I haven't emulated Kempston yet, on the list, once I go over to PASM IO

    Are the files sequential on the SD card? ie not fragmented?
    can you email me the newer fatfs & spi_warp files?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • pullmollpullmoll Posts: 817
    edited 2010-05-29 15:28
    Baggers said...
    Are the files sequential on the SD card? ie not fragmented?
    can you email me the newer fatfs & spi_warp files?

    They should be sequential, but I haven't verified this. The SD is becoming quite populated and I only ever copy more things to it, so there should be no fragmentation.

    I think I just used the wrong keys.. The Speccy didn't have arrow keys, huh?

    The files are attached. Note that fat.start() doesn't expect a memory buffer, but fatfs.spin has function get_memory to get a pointer to its internal buffer. I'm reusing the spi_warp.spin hub RAM now. After fat.start, you should just do a iobuff_ptr := fat.get_memory and be set. You can remove the buffer from the DAT section in io.spin.
    I also attached DracBlade_spi.spin, which should work in case that spi_warp.spin is failing for you.

    Since spi_warp.spin also contains the XMM access code, there are two functions write_xmm_ram and read_xmm_ram in fatfs.spin that can be used instead of the separate xmm code, so you can save one cog.

    You could and still can read non-sequential files with the next_sector function, or now with fread() as well.

    Loading a file with fatfs is now simpler, as there are fopen, fclose, fread and fgetc methods to replace the somewhat crude sector loading. Writing is not (yet) supported, though.

    Edit: I changed your io.spin to use the new fatfs methods. Seems to work for me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects

    Post Edited (pullmoll) : 5/29/2010 4:43:38 PM GMT
  • BaggersBaggers Posts: 3,019
    edited 2010-05-29 17:56
    Cheers pullmoll, updated to new fatfs, and also uses XMM from fatfs, so saves a cog, next maybe I should add the AY to a 48K spectrum lol
    btw, what pins did you connect for audio? so I can use the same pins, and did you use the 16..19 or 20..23 for TV?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Ahle2Ahle2 Posts: 1,178
    edited 2010-05-29 18:01
    Isn't the Spectrum 128 just a Spectrum 48 with more memory and an AY-3-8910 ?
  • BaggersBaggers Posts: 3,019
    edited 2010-05-29 18:02
    Ahle2, yes, and paging! and ROM paging also.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • GiemmeGiemme Posts: 85
    edited 2010-05-29 18:50
    Hi Baggers


    I am happy for your Spectrum emulator ( I couldn't finish my ZX81)
    attached you can find a ZX81 emulated that should run on your emulated Spectrum (didn't test yet but if it works sounds great... an emulator that runs into another emulator )

    there is also a .p to .tap file converter

    here you can find tons all zx81 programs (and also your favorite 3DMAZE

    http://www.zx81.nl/dload/software/

    Hope it works

    Regards

    Gianni



    jumpin.gif
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-05-29 19:05
    Very cool!

    It is a blast from the past to see the old games.
    Baggers said...
    Another update, posted in first post in this thread.


    Updated version now has File Selector, at any time during playing a game, if you press ESC, this then exits the QZ80 emu, and goes back to the file loading menu, be careful, you can't resume ( yet ), nor can you go to BASIC, I'll add that to button B.



    http://www.youtube.com/watch?v=TB5INqBrUYs
    PropSpecEmu2.jpg
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • pullmollpullmoll Posts: 817
    edited 2010-05-29 20:11
    Baggers said...
    btw, what pins did you connect for audio? so I can use the same pins, and did you use the 16..19 or 20..23 for TV?
    I used pin 24 on the DracBlade. It's the 2nd SIO tx and was otherwise unused.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • BaggersBaggers Posts: 3,019
    edited 2010-05-29 21:27
    Giemme, unfortunately, it didn't work, I guess there's some hidden bugs in QZ80, or maybe where I jump back into a snapshot, depending on interrupt status etc. I will however try to get it working [noparse]:)[/noparse]

    Bill, Thanks, yeah it's a great blast from the past, seeing all those classics running again.

    pullmoll, thanks, I'll put my audio on pin24 then too, would be nice now that I've got IO in PASM now also, to maybe set the out(254) to pin 24 [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite



    Post Edited (Baggers) : 5/29/2010 9:32:26 PM GMT
  • GiemmeGiemme Posts: 85
    edited 2010-05-30 10:12
    Baggers, thanks it would be nice.. regards giemme
  • BaggersBaggers Posts: 3,019
    edited 2010-05-30 10:25
    yeah would be good, maybe I should just do a ZX81 next? once Spectrum is working completely

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • BaggersBaggers Posts: 3,019
    edited 2010-05-31 14:14
    Giemme, just to let you know, I've been tinkering more with it, and I now have more games working under emulation [noparse]:)[/noparse]

    I NOW HAVE A ZX81 emulated under spectrum emulation on a PROP system [noparse]:)[/noparse]

    happy days lol

    Will zip it up in a little bit and post, just want to try one more thing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • GiemmeGiemme Posts: 85
    edited 2010-05-31 15:01
    Baggers
    That's a wouderfull news. Could you run 3DMAZE on it?

    I am so exited to run the Flight simulator

    Many Thanks

    Gianni
  • BaggersBaggers Posts: 3,019
    edited 2010-05-31 15:09
    yes, it did run 3DMAZE [noparse]:)[/noparse] although the sands of time took a little more than 30 seconds [noparse];)[/noparse] lol it did go to the game, and I could play it though [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • BaggersBaggers Posts: 3,019
    edited 2010-05-31 17:20
    Updated first post, with new source, + ZX81emu ZX813DMM.SNA which is a ZX81 emulator for the ZXSpectrum running on the props Spectrum Emulator, it's a tad slow, but hey, it works [noparse];)[/noparse]

    Enjoy,
    Baggers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-05-31 17:33
    Very nice!

    I wonder...

    1) Would it not be possible to make a stand-alone ZX81 emulator that would run on a bare prop? It *should* fit with about 16KB-24KB of user memory (24K if the cog load area is recovered)

    2) Would a 16KB Spectrum emulator not fit on a bare prop?

    The reason I am asking is that it might get a wider audience interested, thus increase awareness of the Prop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • BaggersBaggers Posts: 3,019
    edited 2010-05-31 18:13
    Yes, I know what you're getting at Bill, couldn't do a 16KB Spectrum, as it's 16KB RAM and 16KB ROM = 32KB, thus too much to begin with, before the emulator.

    As for ZX81, I'm wondering if even that would be do-able on a basic prop board without extra memory.
    QZ80 is ~2700 longs alone, so there's 10KB, then 8K Rom, then 16K Ram, tis a bit too much that's without drivers etc, or SD Loading
    maybe with 1KB or RAM, but then it reduces the amount of games that would play.

    *cough* There is another Alternative, one that is both fast enough and enough onboard hub-ram, but that's about a year away [noparse]:D[/noparse] *cough*

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • pullmollpullmoll Posts: 817
    edited 2010-05-31 18:47
    Cool! It works fine, also with the files that I have in the shared ./lib directory. Any objections if I create a CVS module from your code, so that I (we) can track the source changes? In case you want to use CVS, too, I can add an account for you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • BaggersBaggers Posts: 3,019
    edited 2010-05-31 18:52
    sure go ahead. I've been playing having tea and getting the girls to bed, so haven't made any changes since that post.
    send me a link to the new files layout.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • pullmollpullmoll Posts: 817
    edited 2010-05-31 18:56
    Baggers said...
    sure go ahead. I've been playing having tea and getting the girls to bed, so haven't made any changes since that post.
    send me a link to the new files layout.

    It's simple. I put just the shared files in a ./lib directory and enter that in the Compiler preferences dialog of BST. Shared are qz80.spin, fatfs.spin and spi_warp.spin among all the emulations.
    BTW the most recent zip has no io.spin?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • BaggersBaggers Posts: 3,019
    edited 2010-05-31 18:57
    that's because I had to merge IO.spin into Speccy.spin, because I needed access to QZ80 functions from within IO.spin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • pullmollpullmoll Posts: 817
    edited 2010-05-31 19:10
    Okay, here's the address:
    : pserver:baggers@pmbits.ath.cx:/anoncvs - the space between the first colon and pserver should not be there. It's because of the forum software mangling the tongue.gif

    I'll PM your password, so you can login to CVS and also commit changes, if you like.
    The first checkout should be like this:
    cvs -d : pserver:baggers@pmbits.ath.cx:/anoncvs co spectrum
    cvs -d : pserver:baggers@pmbits.ath.cx:/anoncvs co lib
    If you prefer a GUI client, you can use WinCVS (http://www.wincvs.org) or TortoiseCVS (http://www.tortoisecvs.org/) on Windows.

    The WebCVS is at http://pmbits.ath.cx/cgi-bin/cvsweb/anoncvs/spectrum/ - whenever I'm online, which happens to be quite often.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects

    Post Edited (pullmoll) : 5/31/2010 7:15:50 PM GMT
  • JT CookJT Cook Posts: 487
    edited 2010-05-31 19:38
    That is prett nice! I had C64 and never grew up on the Speccy, but it is always good seeing a classic system come to life. I do have a question, would the emulator be able to run a Hybrid with the Hydra SRAM card?
  • BaggersBaggers Posts: 3,019
    edited 2010-05-31 19:41
    There's always a possibility [noparse]:)[/noparse] I may give it a try, see how fast it is, I can't remember the access protocol for addressing 64KB on the Hydra SRAM card, but it should be do-able, don't know how fast. will see what I can do, as it would allow others to play on it also. [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-05-31 19:47
    I blame insufficient coffee consumption on my part!

    I FORGOT THE ROM'S!!!!

    You are right.
    Baggers said...
    Yes, I know what you're getting at Bill, couldn't do a 16KB Spectrum, as it's 16KB RAM and 16KB ROM = 32KB, thus too much to begin with, before the emulator.

    As for ZX81, I'm wondering if even that would be do-able on a basic prop board without extra memory.
    QZ80 is ~2700 longs alone, so there's 10KB, then 8K Rom, then 16K Ram, tis a bit too much that's without drivers etc, or SD Loading
    maybe with 1KB or RAM, but then it reduces the amount of games that would play.

    *cough* There is another Alternative, one that is both fast enough and enough onboard hub-ram, but that's about a year away [noparse]:D[/noparse] *cough*
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • pullmollpullmoll Posts: 817
    edited 2010-05-31 20:36
    Baggers said...
    ...for addressing 64KB on the Hydra SRAM card

    That would be cool. I would integrate it in the 8080/8085 and the 6502 cores, too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • BaggersBaggers Posts: 3,019
    edited 2010-05-31 22:29
    ok cool cheers pullmoll [noparse]:)[/noparse] speaking of the 6502 core, how's that progressing?

    Bill, no worries, easy to forget, after all, 16K Spectrum should have really meant 16K total, I guess 32KB Spectrum but you can only use 16KB wouldn't have been a hit with the advertising [noparse]:)[/noparse] lol

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2010-06-01 01:26
    Hello
    pullmoll said...
    Baggers said...
    ...for addressing 64KB on the Hydra SRAM card

    That would be cool. I would integrate it in the 8080/8085 and the 6502 cores, too.


    Some time ago I made an attempt·at simulation of the Hydra SRAM card with Gear:

    http://forums.parallax.com/showthread.php?p=854489

    I remember it was at least able to pass the tests made for the real card.

    Maybe you could find some use for it, if you don't have the real hardware available for testing.



    Regards

    Alessandro
  • pullmollpullmoll Posts: 817
    edited 2010-06-01 10:17
    Baggers said...
    speaking of the 6502 core, how's that progressing?

    Still the same. I tried many things to nail down that strange bug with the memory access - without luck. It must be some very nasty bug, sitting there and grinning at stupid me.
    When I call the i/o functions from Spin to do the scrolling, it works like expected, so it has to be in the q6502 code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • BaggersBaggers Posts: 3,019
    edited 2010-06-02 14:25
    I've got the files now thanks [noparse]:)[/noparse] will update it from within this layout now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
Sign In or Register to comment.