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

Spectrum Emulator ( now with SNA file selector )

BaggersBaggers Posts: 3,019
edited 2014-11-08 15:44 in Propeller 1
Hi All,

Here is my Spectrum Emulator ( well I guess it's more a culmination of a lot of peoples work. Chip for his original TV and VGA drivers and his prop of course lol, pullmoll for his mods to chips VGA driver, to do one attribute per character, and now my own mods to make it a 256x192 bitmap driver, and of course pullmoll's Z80 emu.·)

Cheers,
Baggers.

Edit:

V1.0 : ·Added Source for Spectrum emu, and removed old spec vga driver source [noparse]:)[/noparse]

V1.1 file = speccy-bst-archive-100529-153523.zip
V1.1 :· Added SNA file selector, which also shows a screenshot of game highlighted [noparse]:)[/noparse]
··········Press esc to select new game, be careful you can't continue with the current game once you press esc, it's gone, until I put a continue in.
········· I've also had to move IO.spin into Speccy.spin, because I couldn't talk to QZ80 from IO.

V1.2 file = speccy-bst-archive-100529-185161.zip
V1.2 :· Added new fatfs.spin, also freeing up a cog, due to fatfs now having XMM included.



V1.3 file = speccy-bst-archive-100531-181012.zip
V1.3 :· IO is now handled in PASM, and I've fixed a some start ups, so more games now work [noparse]:)[/noparse] including the ZX81 emulator that Giemme posted.

http://www.youtube.com/watch?v=TB5INqBrUYs

PropSpecEmu2.jpg



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



Post Edited (Baggers) : 5/31/2010 5:21:06 PM GMT
«134

Comments

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-05-09 22:30
    Typical !

    I am making up a "DracBlade" board with two selectable EEPROMs, for Nas and CPM, and you come up with a third option.

    It will go ino my "replacement Nascom" which has been a 8052 MCS, AVR644 ChipBsaic2 and a few others before. I am going to have to make it dependant on the SD card if I am to make it truly flexible.

    Hey-Ho.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
    640 x 480 - 51K
    640 x 480 - 51K
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-05-10 00:47
    This sounds like fun.

    The CP/M emulation is no longer just CP/M. It is now evolving into emulating multiple computers. I've been thinking along the same lines as Toby. I put a NASCOM on the board, then wiped the eeprom and put a CP/M computer on the board. Thanks to pullmoll's code, the sd card stayed the same. Indeed, I still have all the boot data for both emulations on the sd card. There is lots of room, and as the number of emulations increases, one could imagine a single SD card image that can do everything.

    So - to the eeprom. 32k per emulation, so two is the max you can fit on an eeprom. Is it possible to put all the emulation code on the sd card? For flexibility, you want almost identical code, for debugging etc. So I wonder, what is the absolute minimalist code needed to boot up a propeller and give you a menu choice to select which 32k hub ram image to load?

    sd card driver
    keyboard
    display

    This is a mini operating system ? sphinx

    You select 'NASCOM'.

    Then all cogs stop working except one that loads 32k of data off an sd card and into hub ram. Then it jumps to the beginning of the code and starts running it, which then overwrites the cog that loaded it etc. Possible??

    This probably is going off on a tangent. Getting a spectrum working sounds fun. Are you going to use all the clever code in qZ80?

    A spectrum = games, right?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-05-10 02:37
    Drac: RamBlade does this already. See the thread for the source. You only have to change the SD pins & xtal for the eeprom bootloader to work with any prop. It boots the old PropDos as I haven't yet been happy with SphinxOS (as I need to fix the SD driver and shift the rendezvous locations and I didnt want to release a version where this will move again).

    This gives you an operating system where you can do dir etc and can run any emulation. So all emulations can be on the same SD. This is what I believed was required.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-05-10 03:11
    Ah Cluso99, so it is already written?

    Sphinx or propdos doesn't really matter for this problem - all you really need is a way of loading up binary data off the sd card. Then Toby can have all the emulations on one sd card (and only need a 32k eeprom)

    Ok, thinking out loud. Let's say I have propdos on my eeprom and it boots into that and gives you a menu of which computer emulation you want to run. Pullmoll issues a new version of aZ80. I do a quick test with an F10 download to ram and it works fine. So, now, do I compile that to a binary and then pop out the sd card, put it in my USB reader and copy that binary onto the sd card?

    If so, that would be pretty easy to do.

    I like the idea of a micro sd card being many computers. It is a CP/M computer. A NASCOM. A Spectrum. You choose when you boot it up.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller

    Post Edited (Dr_Acula) : 5/10/2010 3:19:22 AM GMT
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-05-10 04:37
    Yes, that is exactly how it works. In fact, all the bootloader does is run a binary (called something like BootProp.bin which is the PropDos currently) from the SD card. So the eeprom code NEVER needs to be changed. You can put a new SD card into the board and something else may run. Or you just have the PropDos/SphinxOS or whatever run and you then choose the program to run, or you can place the filename in autoexec.bat and it will start automeatically.

    It is all descrived on the RamBlade thread with the source code. SO it should be easy for everyone to use and that way we keep it all standard. For ZiCog, I just copy a new binary to the sd card and it runs! So as soon as I have SphinxOS working correctly, we can just copy that and rename it to BootProp.bin and we will have substituted PropDos with SPhinxOS. No other changes needed.

    To expand on this, I want to build the SphinxOS get & put commands to do FTF from the pc via serial. Same could apply to standalone xmodem/ymodem etc. Get, Put, xmodem, ymodem should all be Sphinx aware programs and then we can release binaries which do not care about the hardware or drivers. This is my aim anyway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • BaggersBaggers Posts: 3,019
    edited 2010-05-10 08:09
    Toby, go with a single emulation, and have a boot loader, it's the best way to do it, a bit like when dual booting a PC/Mac [noparse]:D[/noparse]

    Dr_Acula, yes, I'm going to use all the clever code in qz80, and modify it to work a spectrum, and yes, a spectrum will mean many games [noparse]:D[/noparse] as for the emulation speed, I'm not sure yet, how fast it'll be, so although it'll work, it may not play games very well, speed wise.

    on a side note, once we have faster prop ( Next year ) it will run a LOT faster than it currently does, not to mention the fact that it's internal Hub-RAM will be big enough to store the 128KB for the bigger games also, and not need the external SRAM so will be faster again [noparse]:D[/noparse]

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

    ·
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-05-10 08:25
    LOL no no no, you don't want games to run fast. You want them to run nice and sloooow *grin*. Then you can get that high score that eluded you all through your youth!

    Pullmoll says it is going to be tricky to get CP/M plus VGA to fit. Though he has got a NASCOM to fit and there is still the leftover hub ram from loading cogs. So lots of potential there to concatenate cogs, load them as cogjects off an sd card, or have a VGA driver that reads ram from different locations.

    But - for games, maybe you could save some code? For starters, maybe you don't need the UART code?

    What other bits do you need to get a spectrum working?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller

    Post Edited (Dr_Acula) : 5/10/2010 8:35:49 AM GMT
  • BaggersBaggers Posts: 3,019
    edited 2010-05-10 08:42
    very true lol [noparse]:)[/noparse]

    yes, I'll be removing lots of unwanted code [noparse]:)[/noparse] I'll be keeping the SD for loading games [noparse]:)[/noparse] and the qz80 obviously, I have my display driver, I'll be changing all the IO handler code, so hopefully should save some there too, so should be able to fit in the 6.75K for screen.

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

    ·
  • BaggersBaggers Posts: 3,019
    edited 2010-05-13 17:46
    Hi guys,
    I just to give you an update [noparse]:)[/noparse]

    I have the VGA screen driver working ( attributes, bright, flash etc. )

    I've put in the The Spectrum Rom, and it now gets to the now immortal words "(C) 1982 Sinclair Research Ltd" [noparse]:D[/noparse] so Happy days there.
    Next is to get the IO ports working for the keyboard, and we're away, and add some code to have game files loading. [noparse]:)[/noparse]

    Once it's all working with keyboard input etc, I'll update with source, video and pic [noparse]:)[/noparse]

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

    ·
  • pullmollpullmoll Posts: 817
    edited 2010-05-13 17:58
    Baggers said...
    Once it's all working with keyboard input etc, I'll update with source, video and pic [noparse]:)[/noparse]

    Come on... I want to see a picture! Now! smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • nyjenyje Posts: 35
    edited 2010-05-13 18:17
    Much respect baggers, incredible work wink.gif It's my birthday today, and this news is a great gift, thanks wink.gif
    Time to draw up a nostalgic games list to try wink.gif
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-05-13 18:35
    You could use one of those roll up keyboards for an "authentic" feel tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • Ahle2Ahle2 Posts: 1,178
    edited 2010-05-13 18:46
    It seems like there is an increasing demand of an emulation of the Ay38912 (Booth from Baggers an Pullmoll).
    It shouldn't be any hard at all compared to the much more advanced SID-chip.
    Maybe we could even have better than CD quality sample playback thanks to the simplicity of the chip. (SIDcog is "only" 31Khz)

    Probably it wouldn't take more than a few hours to have a decent emulation of it.
    This will be my next thing on my "Propeller ToDo list".
    However, I do not have much "propeller time" at the moment. cry.gifblush.gif
  • BaggersBaggers Posts: 3,019
    edited 2010-05-13 19:00
    Pullmoll, ok I'll sort out a piccy for everyone [noparse];)[/noparse]

    nyje, thanks roll on nostalga times!

    Toby lol, yeah, that would be interesting [noparse]:D[/noparse]

    Ahle2, No rush, as I'm getting the 48K Spectrum working first ;D

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

    ·
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-05-13 19:21
    Will you be fully emulating the keyboard actions ? You know, when you needed to press 8 buttons at once to "shortcut" the input of "LET".

    That may have been ok for the youth, of the day, but now the arthritis is kicking in ....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • BaggersBaggers Posts: 3,019
    edited 2010-05-13 20:43
    Toby, it's part of the ROM, that does that, however, there is another ROM which allows real typing, I can copy that in also, once I finish ( and find the ROM )

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

    ·
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-05-13 21:15
    Sorry Baggers, I wasn't being serious (again) I always remembered the speccy KBD when I had to do a lamp hours reset on projectors, that also required three hands and a foot, at once.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point

    Post Edited (Toby Seckshund) : 5/13/2010 9:23:41 PM GMT
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-05-14 00:51
    The excitement is building! What sort of games are you going to show us?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • BaggersBaggers Posts: 3,019
    edited 2010-05-14 07:20
    Toby, no worries [noparse];)[/noparse] yeah it was the brain child of an octopus [noparse]:)[/noparse] lol

    Dr_Acula, not sure yet, will see once I get the last bits sorted, and can load a game [noparse]:D[/noparse] then they should flood through [noparse]:D[/noparse]

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

    ·
  • BaggersBaggers Posts: 3,019
    edited 2010-05-14 21:05
    I've got keyboard working [noparse]:)[/noparse] just need to map output, and load and save on ESC menu, then we're ready to rock [noparse]:)[/noparse]

    To wet your appetite, here's a quick video demo [noparse]:D[/noparse]


    http://www.youtube.com/watch?v=5thytZ_Xem8


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

    ·
  • pullmollpullmoll Posts: 817
    edited 2010-05-14 22:19
    So I take it that #define PORT16 works? It was untested and I'm always suspicious when something untested works out of the box.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects
  • BaggersBaggers Posts: 3,019
    edited 2010-05-15 07:56
    pullmoll, almost, I had to change a couple of little things, but yeah it works now. [noparse]:D[/noparse]

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

    ·
  • BaggersBaggers Posts: 3,019
    edited 2010-05-15 17:54
    I thought I'd let you know, it's almost there.
    Not had chance to do any more on it today though, as I've been taking my kids to their friends party,
    I won't be able to do any tomorrow either, as I'm going to a Retro Computer Museum ( Retro Gaming Event ).

    Currently it runs about 1/4 of the speed of a spectrum, but I think that's down to the IO in spin, I'll convert that to PASM which should speed it up a tad [noparse]:D[/noparse]
    once I've got that done in PASM, it's then down to adding a LOAD and SAVE program from and to SD, and we're sorted!

    Baggers.

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

    ·
  • BaggersBaggers Posts: 3,019
    edited 2010-05-26 22:14
    Just to update on what's going on,
    I now have it (hardwired)loading a .SNA file and running Manic Miner [noparse];)[/noparse] there are some issues with other games, but Manic Miner seems to work fine, I think there's some issues with interrupts, which I'm still looking into.
    It's late, and I'm up early tomorrow, so I'll post pics and source so far ( for DracBlade )

    Baggers

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

    ·
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-05-26 22:17
    Pictures!!

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Are you Propeller Powered?
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • BaggersBaggers Posts: 3,019
    edited 2010-05-27 09:08
    Here's a video of it in action, running faster than I expected [noparse]:)[/noparse]

    http://www.youtube.com/watch?v=qPqTGPTfILE

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

    ·
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-05-27 11:44
    That neat little game running on a humble little dracblade? Woot! That has made my day.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • BaggersBaggers Posts: 3,019
    edited 2010-05-27 11:57
    Thanks Dr_Acula [noparse]:)[/noparse] yeah I'll post source in a bit, so others can play, I'm getting ready to take my daughter to pre-school at the moment, so when I get back I'll post it.
    It's no way near being "postable tbh" and it's all in one directory, due to archiving, and using it, but it's working enough to share the goodness, til it's tidy and working with more games.

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

    ·
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-05-27 14:15
    Wonderful videos Baggers! Made my day! Good stuff for Propellerpowered.
    (This means there is hope for a C= emulator one day. [noparse]:)[/noparse]

    Any chance that some commands could be added to the BASIC for some I/O control?
    This could make an interesting alternative to Femtobasic for speccy heads. [noparse]:)[/noparse]

    Yup, he did it! Asking for new features before the core project is done. <SMIRK>

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Are you Propeller Powered?
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • Ahle2Ahle2 Posts: 1,178
    edited 2010-05-27 15:48
    @OBC
    "Unfortunately" the C64 is quite a lot more advanced and therefore harder to emulate. [noparse]:([/noparse]
    But we have got some of the building blocks already implemented. (SIDcog and two different 6502 cores)
    I will get myself a Dracblade and then we will see what will happen. [noparse]:)[/noparse]
    The hardest part will be the VIC emulation.
Sign In or Register to comment.