Shop OBEX P1 Docs P2 Docs Learn Events
ZiCog a Zilog Z80 emulator in 1 Cog - Page 8 — Parallax Forums

ZiCog a Zilog Z80 emulator in 1 Cog

1568101141

Comments

  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2009-04-03 19:08
    Hello

    Sorry for the confusion, but I don't own an Hydra card (yet?)! I'm using the HX512·expansion with the Parallax Proto Board, very similar to·any SRAM chip plus·latches for the whole address, that's why I thought it was relevant here more than in the hydra forum.

    I also connected its databus to P0..P7 instead of P16..P23, so databus can be accessed without shifting the data (at the price that command bitmasks do not fit anymore in constants). Anyway it could make sense at this stage to put it back on the same pins used on hydra, so other people·owning a real hydra board could join if they want.

    Guys,·I know you're probably very busy on your own so please don't change your priorities, I'll try to follow at my (slow) pace the best that I can.

    A small update: I found an·obvious·error in the code section I posted, I went home from job thinking that I nailed it... still no joy confused.gif
    Have to put back the serial terminal to·get some·screenshots, since the external RAM began to work I've been using VGA and PS2 keyboard.

    Regarding the ramblings on the HX512 firmware mod I'm going to start another thread.

    Ciao
    Alessandro
    ·
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-04-04 07:52
    Blimey, Cluso99 and heater those screenshots are impressive!

    If that works, a lot is working!

    Mbasic. Try

    10 a=3
    20 b=4
    30 c=a+b
    40 print c

    Then RUN

    and this will exercise the disk fat stuff, try (in caps)
    SAVE "MYPROG",A

    and then
    SYSTEM

    and then at the A> prompt
    TYPE MYPROG.BAS

    which should type it out from within CP/M (the save with ,A saves as ascii)

    then go back into mbasic and type
    LOAD "MYPROG"
    and then
    LIST

    Post Edited (Dr_Acula (James Moxham)) : 4/4/2009 7:58:51 AM GMT
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-04 11:27
    James: The program works :-) So now I have proved that write works (to my A drive SRAM). I did a DIR and it shows up.

    However, you cannot type a .bas file (wrong format). I thought it was the emulation but I can type a .txt file. Also originally I used lower case and mbasic saved the filename in lower case but the extension in upper case. I was able to load it back again only when saved in upper case. Pic attached. jumpin.gif

    I also have PropCMD working (see the thread PropCMD yesterday).

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
    646 x 729 - 50K
  • TreeLabTreeLab Posts: 138
    edited 2009-04-04 15:25
    I am astonished and impressed by this thread. Amazing.

    Cluso : I didn't see the A option on the way you saved the basic program shown on the screenshot.

    Cheers!
    Paul Rowntree
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-05 00:19
    TreeLab: I guess it's the default. The first time I used the A option. Later (after a complete reboot to get a nice screenshot) if forgot the A (didn't realise till you pointed this out) and it obviously worked

    Just to add. If you use lower case, you have to load with lower case. Too long ago to remember the ins and outs of MBASIC.

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-04-05 00:41
    Yes, the ,A saves as ascii. If you leave it out, it saves as a tokenised format which was quicker to save and load off a cassette tape and was smaller. It was not an issue with disk drives and certainly not with the amazing speed of the 'propeller drive'. So I always use the ,A option as it makes it handy for doing things like sending it over to a PC for some quick editing in notepad, and also you need the ,A option if you want to compile it with bascom.

    Re saving in smalls, welcome to the world of CP/M bugs! Only mbasic lets you save in smalls. All other programs convert to capitals automatically. But if you save in smalls, you can't delete the file. ERA can't find it. I never found a solution apart from a reformat. Mind you, I've moved over to sbasic which is much more like C and .net All these save properly in caps. And I'm very impressed with BDS C http://www.bdsoft.com/resources/bdsc.html which has the documentation and I think it is on the simh too. And BDS is open source (who knows what MBASIC is but it does come up with that copyright message on startup).

    Well, the point of that experiment was to prove the drives work, and I am amazed at what you have working. Things that took the N8VEM group months to get working (eg file transfer to and from a PC - we had a dodgy version of xmodem) are being done in a few days using things already on the propeller (sd cards etc).

    Ok, how about getting wordstar working? There is a disk image on the altair simh. But the catch here is that it needs vt100 codes to move the cursor around. You can still run it but you will get lots of ESC[noparse][[/noparse]12;56 type stuff all over the screen.

    But, there is vt100 code already out there. I think it was OldBitCollector's code (apologies if I got that wrong) on Vince's PockeTerm propeller vga/keyboard "dumb terminal". The PockeTerm looks very similar to blade 1... (cluso how did you get so many things right on a v1.0 board?!)

    The N8VEM talks to a PockeTerm using standard RS232 serial cable http://hackaday.com/2009/03/04/n8vem-computer-with-a-3km-wireless-link/

    How do the blades communicate?

    Post Edited (Dr_Acula (James Moxham)) : 4/5/2009 12:48:51 AM GMT
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-05 02:15
    James:

    All blades will communicate (not done yet) with an ultraHS 14Mbps serial link with #2 as the master over 2 pins. I have not done this yet but will be based on the tests done by Beau. I will implement my own protocol for this to get faster (although probably not required) throughput. #3 ultimately will be the PC connection.

    Thanks for the "A" info. That's why a TYPE gave me screen Smile. I believe PropCMD will delete the file. It is not an issue for me yet as I am reloading from uSD to SRAM and not saving to uSD yet via ZiCog. PropCMD can write files to uSD.

    I have to get the uSD working better. At the moment between loading blocks of 8K into SRAM I have to disable the uSD and that means I restart at the beginning of the uSD file to continue reloading. So I have to understand the FAT and SD spec better to go straight to the sector/block I want - I am still using too high a level to communicate between the pasm cog drivers.

    I expect to start using PropCMD to boot ZiCog shortly. So when I power up the prop, its eeprom will run PropCMD which will allow me to load any prop binary from the uSD (or can boot it directly if placed in a file called autoexec.bat). This binary may be ZiCog smile.gif

    I am hoping OBC will get the Terminal program running in Blade #3 on his TriBladeProp (hint, hint). From what I've seen, it's done - just needs the replacement UFDX driver from me (but we can use FDXplus in the meantime).

    Wordstar - well ED is on the disk. Can probably use this for now.

    Last night I migrated the code to homespun with compiler #ifdef directives, but the zicog cpu cog v0.6 code is not working (v0.5 is fine as is the spin v0.6 demo code). It's amazing - homespun picked a missing "#" in a jump statement. The others were intentional, so I now use a comment jmp/ret(indirect) so that the homespun warning shows the comment (indirect) so I know its not an error. It also complained about "org" statements missing "0" (FDX, etc). So I have added the "0".

    Homespun use on windoze:
    I needed to use the conditional compiles so that we can maintain ZiCog running on traditional prop hardware. But once I did this I found othe great uses for the #ifdef directive for debugging smile.gif
    I still use PropTool for the editting (make sure you save first), leave it open, switch to your open dos window (make a simple xxx.bat program) and run xxx to compile, change windows back to PropTool and download the binary.

    My suggestion: If you don't use homespun, at least use it occasionally to check your code. Maybe bstc has the same warning checks, but it does not have conditional compilation at this time.

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • heaterheater Posts: 3,370
    edited 2009-04-05 05:46
    14Mbps ! Wow. I think what we need here is multiplexing the use of that fat pipe between lesser pipes. That is multiple applications should be able to open up what look (mostly) like normal serial links that go over the fast link in a shared fashion. That is a topic for the TriBlade thread I guess.

    Original Microsoft Basic only understood upper case, seems MBASIC inherited some of that.

    There is a cut down version of WordStar called WordMaster (WM.COM) included in the A: disk. Needs VT100 to work though.

    I was just starting to play with homespun under Linux. Runs a treat under mono no wine required. For editing and Prop loading I want to use the Linux BST.

    Major problem: I guess it is the Parallax Prop Tool and or BST but of course when using the drawing symbols we end up with a file full of wide characters rather than normal byte chars. That's nice except it makes the use of all normal editors and tools impossible e.g. grep, sed, diff, patch etc. Not to mention test only version control systems. Most normal programming editors etc.

    How can we get rid of that junk and extract a normal text file ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-05 12:46
    Heater: I did not think about that. I like the pretty boxes around code headers - just me being me! I'll remove then, it's easy enough.

    I knew bst couldn't do conditionals as I had emailed Brad offline. However, his IDE is an all in one, runs on linux/mac/windoze, and it has a Terminal window in it so could be easier to use than the current mix I am now into. Also, I forgot you were going linux. Haven't touched the code today - missing my fix :-(

    Not sure if I said this, but I am going to quickly try booting ZiCog from uSD with PropCMD. It should work since I already have PropCMD working (see PropCMD thread).

    I think I am going to have to solder the 24C1024 into Blade #2. I don't like the 24C512 just sitting in the holes without solder - it works though, but not very professional.

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • BradCBradC Posts: 2,601
    edited 2009-04-05 13:02
    heater said...
    Major problem: I guess it is the Parallax Prop Tool and or BST but of course when using the drawing symbols we end up with a file full of wide characters rather than normal byte chars. That's nice except it makes the use of all normal editors and tools impossible e.g. grep, sed, diff, patch etc. Not to mention test only version control systems. Most normal programming editors etc.

    How can we get rid of that junk and extract a normal text file ?

    bst has an option to save the files as UTF-8 rather than UTF-16... that will make life a bit easier. If that was the case you could go the whole hog and use a real pre-processor to de-munge your code before passing it to the compiler.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
  • heaterheater Posts: 3,370
    edited 2009-04-05 13:11
    I can see this unicode thing being a pain in future. Might have to knock up a script to convert back to ASCII. For example the first thing I wanted to do was a diff between your new version and mine. Oh dear.

    bst is great, I've already been playing with the terminal, works fine. Prop down load just works.

    No idea about proCMD, I'll look into it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-05 13:24
    Heater: You don't have to do a thing. PropCMD just sits on top of the FAT and can boot prop code. ZiCog binary is prop code, so it takes over. No changes to ZiCog for this part. So the idea (not for development) is that PropCMD is in the eeprom. When it loads it looks for the SD card and if found looks for a file autoexec.bat and loads it into the prop for execution (may have this a little wrong but essentially this). If not it waits like the old dos or cpm did for a response on what to do (DIR, load/execute a file, etc). So we just load the ZiCog binary and execute it and voila - we have ZiCog and CPM running.... Sweet. I think its worth an hour or less.

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • heaterheater Posts: 3,370
    edited 2009-04-05 13:24
    Sorry BradC, I thought the UTF-8 thing was not implemented as it did not do anything when I set it on and hit save. Seems one has to make a little change to the file before control-S will do anything. Thats OK. The rest of the non ASCII junk can be removed by a run through "strings".

    I was already wondering about using the C preprocessor on spin files. No idea about it really yet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.

    Post Edited (heater) : 4/5/2009 1:30:32 PM GMT
  • heaterheater Posts: 3,370
    edited 2009-04-05 13:30
    Clusso, that sounds totally brilliant.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-05 14:52
    SUCCESS jumpin.gif·· Pic attached

    PropCMD is stored in the eeprom. When the Prop on the TriBladeProp boots, it loads PropCMD. I am using a PC for the Terminal so I then load the ZiCog binary from the microSD card. This in turn executes on the Prop and loads the Z80 CPM code into the ZiCogs 64KB memory (external SRAM) and the image of a 960KB CPM drive from the microSD into the remaining SRAM. It then runs the emulator which can run MBASIC, DIR, TYPE, SURVEY, etc CPM commands/programs, all under Z80 emulation by the Prop.

    Thanks to Michael Rychlik (heater) for ZiCog; Roger Williams(localroger)/Michelli Scales for PropCMD·& Jeff Ledger (OBC) for PropDOS; Radical Eye Software (Tomas Rokicki) and Mike Green for fswrFemto; Mike Green for sdspiFemto (which is the ultimate PASM driver for the SD and EEPROM); Andy Schenk for PC_Text & PC_Keyboard; Parallax, Inc.(Chip) and ?? for doing the Plus extensions for FullDuplexSerialPlus. My apologies to anyone I have wrong or missed -·please PM me so I can include you. There have been so many others who have helped me along the way·to learn the prop, including especially Hippy.

    I am so happy I am going to break the rule and post this on both the·ZiCog and·PropCMD threads - please don't abuse me for this cool.gif

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm

    Post Edited (Cluso99) : 4/6/2009 12:29:47 AM GMT
  • heaterheater Posts: 3,370
    edited 2009-04-05 17:31
    Excellent !

    Don't forget to add Peter Schorn, Gary Kildal, Paul Allen and Bill Gates to the list of those who created what we see in the screen shots here [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-04-05 21:21
    Will you lot stop being so good? If it is so easy to get 99.99% of what you think you need for just a click, how are the bewilldered, such as I, supposed to knuckle-down and educate ourselves?

    Can't you intoduce a bunch of variables such as 10+ sorts of uncompatable compilers (AVR) just to confuse the stupid?

    Hey-ho, me thinks the brain is close behind the eyesight!
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-04-05 21:30
    By the way, Heater, I begrudgenly agrre with the credit to Mr BG. For no other reason than it is because of his involvement that the whole forum thing, such as this one has allowed global comms of information to happen. It would have happened at some point but here we are, now.

    clusso
    I have a set of beer mats with kepple island on them, the guy that gave them to me is extremely envious of you!
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-06 00:33
    Actually, email was around and used by Apple a long time before BG was heavily involved. He did have his Z80 card for Apple. In 1983 & 1984 I used to email Apple new code for a board we sold to them. However, my credits are for the current Propeller work, that has helped me, not for the older CPM stuff which anybody can research.

    Kepple Is hey - nice island but make sure your anchor is firmly attached !

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-04-06 01:35
    Woot! You can post on as many forums as you like!

    I have been studying the code and the circuit diagram. A couple of questions: Is the flash ram used for anything or is it reading straight off the sd card. And is the second ram chip needed for this implementation or is it a spare for later on?

    Also, is this running in hub or in a cog (I'm just thinking whether it might ever be possible to get the terminal/keyboard/vga driver running on the same prop. Or would I be dreamin'?)

    This is so exciting! What is next - a link via that amazingly fast serial link to the terminal prop to get a self contained computer running?
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-04-06 02:08
    The Flash ROM(s) have not been fitted. It will not be required if a uSD is fitted.

    The PropCMD code is in the EEPROM and this loads (boots) programs including ZiCog from the uSD card.

    ZiCog loads code into the SRAM, the whole 1MB. So yes, both SRAMs on Blade #2 are used. 960KB is the ram disk A. Once the uSD is working as a disk with ZiCog it will not be necessary to use the SRAM disk, but it will be extremely fast, so the extra $4 for the second SRAM is worth it.

    It is running in cog, but there is also code in hub and I currently load the SRAM via an 8KB buffer in hub, so there is not much space there, although a lot will be recoverable as the code is tidied.

    There is no way the terminal/keyboard/vga can be in Prop Blade #2. There are no I/O pins available. You will have to use Blade #1 or #3.

    Next:
    Get ZiCog reading and writing uSD files (working on the SRAM disk only).
    Then get ZiCog able to load (boot) prop programs (i.e. return to PropCMD).
    Then get the Terminal running on Blade #3 (OBC has a VT100 solution running so should just need a recompile)
    Add reset and code booting from Blade #2 to Blades #1 & #3 (so they do not require EEPROMs smile.gif )
    Get UHSFDX (14Mbps serial) between props running.

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

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • kwinnkwinn Posts: 8,697
    edited 2009-04-06 02:39
    Kudos are due to all involved in this project, for both the hardware and software that has come out of it. I am looking forward to the time when I can make use of both. Great work everyone.

    Regarding giving credit to the pioneers of the PC, I have to agree that all those mentioned above, as well as many others deserve it. We would not be where we are without all of their contributions. Although not a big fan I also have to give credit to Bill Gates and Microsoft. Credit is due for creating the low cost standardized hardware and software we have today. You could even argue that they made Unix and Linux more adherent to standards in order to survive the Windows juggernaut. While we are at it lets not forget Intel for the hardware end of it.

    The end result of all this is a nice platform to use for the PROPELLER. The best microcontoller of all.
  • rokickirokicki Posts: 1,000
    edited 2009-04-06 05:41
    This is really amazing, really incredible work. Congratulations to everyone!
  • GiemmeGiemme Posts: 85
    edited 2009-04-06 15:23
    Congratulation to everybody for this project.

    which files and parameters shall I modify to have it running on a Hydra box with 512K Sram card?

    Thanks in advance for your advise

    Regards

    Gianni
  • heaterheater Posts: 3,370
    edited 2009-04-06 16:07
    Thank you Giemme. This whole project has grown into quite a party, so pull up a beer and tuck in...

    First thing you need is to modify zicog.spin to read bytes from the Hydra's RAM card instead of HUB RAM or the external RAM on the TriBlade. I believe AntoineDoinel is already working on this (see some earlier posts here). Although he has the Hydra card attached to a Prop Demo board as far as I can tell. We are using C style #defines and #ifdef to select whether HUB RAM code or ext RAM code is compiled in so it is very easy to see which parts of the code need changing. Just look for #ifdef TriBladeProp and the like. To use this mechanism we are compiling with mpark's HomeSpun Spin compiler. If you want to use the Prop Tool or BST you would have to edit the file accordingly.
    The idea is to always have only one version of the zicog emulator file that contains conditionally compiled support for all different RAM types. That way we only have to fix z80 emulation problems in one file once.

    Next problem is getting something into the RAM for the zicog emulator to run. Here things get more complicated. Do you have SD card on the Hydra for example?
    As a first step use "file" statements in Spin to include the CP/M and BIOS binaries which are then copied to external RAM by some Spin code. This is how Cluso started off.

    I think I remember that your interest was in a Sinclair emulation so many pretty much everything outside of zicog.spin will be different.

    Zicog has a debug mode where you can watch it fetch and execute one instruction at a time.

    I don't know much about the Hydra and my available time now is limited so my help now is necessarily limited. I would love to know that ZiCog can live there as well. Perhaps others here have more to say on it.

    Edit: Tell us more about what you have in mind.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • GiemmeGiemme Posts: 85
    edited 2009-04-06 18:34
    Hi Heater

    Thanks for your advice.

    Could you please give me the link of the mpark's Homespun compiler so that I will have a code alligned with yours.

    Your quote "Next problem is getting something into the RAM for the zicog emulator to run"
    This will be difficult to realize because the hydra expansion slot is used by the 512Ksram card and I cannot insert the SD Card :-( How big are this files? because the sram card has a 128k eeprom installed on it that I could use to install the assets.

    Yes you are right, I am still working to my zx81 emulator, I am porting the the z80 spin code into lmm. I am trying to understand it first. Maybe is it possible to use your z80 emulator.

    Regards

    Gianni
  • BaggersBaggers Posts: 3,019
    edited 2009-04-06 18:42
    Heater, I might have a go at getting it on the Hybrid, once I've finished the E3 demo, as it'd be easier to do on Hybrid, as that has SD built in, and you can plug HX512 into it [noparse]:)[/noparse]

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

    ·
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2009-04-06 19:19
    Giemme said...
    Could you please give me the link of the mpark's Homespun compiler so that I will have a code alligned with yours.

    Here you go:
    http://forums.parallax.com/showthread.php?p=749832


    And the Wiki is here:
    propeller.wikispaces.com/Homespun+Spin+Compiler

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • GiemmeGiemme Posts: 85
    edited 2009-04-06 19:41
    Hi Bob

    excellent!! I compiled a small spin programm and it works!

    Thanks

    Gianni
  • heaterheater Posts: 3,370
    edited 2009-04-06 19:45
    Giemme: OK Bob beet me to it.

    If you want to run CP/M you need to put CPP.COM, BDOS.COM, CBIOSX.COM and DSKBOOT.COM into the correct locations at the top of the Z80's 64K RAM space. These files are only a handful of kilo bytes and will easily fit in the 128K eeprom. This at least gets CP/M running up to the prompt A> and is a good first step.

    Next you need to have a CP/M disk image somewhere, this is a bit more tricky. I guess it would be possible to have a the rest of the EEPROM filled with a small disk image. to use as drive A: Might be too small to work with though.

    Or you create a RAM disk in the free space on the RAM card and populate it with stuff from the EEPROM. This is still small but bigger than earlier CP/M floppy disks I think.

    Does the Hydra have some free pins to connect an SD card? That's what I did on my home made demo board in a very crude way.

    You are of course welcome to use the ZiCog code. I hope soon it is an accurate enough emulation to handle whatever surprises Clive Sinclair has in the ZX81 ROMS. Sadly I know noting of the ZX81 architecture so cannot advise on that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
Sign In or Register to comment.