Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Powered Gameboy — Parallax Forums

Propeller Powered Gameboy

VaatiVaati Posts: 712
edited 2010-03-10 12:47 in Propeller 1
Has there been a project for the prop that emulates the Z80?· I think I recall seeing something long ago about it...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

(no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!

Post Edited (Vaati) : 2/15/2010 3:34:48 PM GMT
«13

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2010-02-07 23:18
    http://forums.parallax.com/showthread.php?p=788511 [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
    Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler Largos - upcoming nano operating system
  • jazzedjazzed Posts: 11,803
    edited 2010-02-07 23:34
    Vaati said...
    Has there been a project for the prop that emulates the Z80? I think I recall seeing something long ago about it...
    You've been on vacation? I'm jealous.
  • VaatiVaati Posts: 712
    edited 2010-02-07 23:45
    Bill,
    Awesome!! Thanks for the link...

    Jazzed,
    Yes, technically speaking. I have ventured beyond these forum pages into the vast interwebz in search of game development links... smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-02-07 23:49
    You are welcome [noparse]:)[/noparse]
    Vaati said...
    Bill,
    Awesome!! Thanks for the link...

    Jazzed,
    Yes, technically speaking. I have ventured beyond these forum pages into the vast interwebz in search of game development links... smile.gif
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
    Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler Largos - upcoming nano operating system
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-02-07 23:53
    Yes I vaguely recall something about a Z80 emulation.

    There are at least 4 active threads and I'm most grateful to the patience of those on the forum who might think that the retro computer fraternity is taking over! But in defence, I think that the concepts in the Z80 emulation are spawning other interesting things, eg pasm overlays for bigger code than 2k in a cog, 300kilobyte programs in C, more memory and the concept of 'Big Spin' programs. And there is huge potential for games that hasn't been exploited yet.

    I have three propeller Z80 emulator boards on my desk all chatting via wireless. What is the problem that you need solving?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • VaatiVaati Posts: 712
    edited 2010-02-08 00:01
    Awesome!!!!

    Ok--the original gameboy actually emulates the Z80, and the boot rom file was extracted some time ago. I am putting together a text file of the asm code right now, and then you can see if it runs on the z80.

    So, what are the limits on the z80 prop? can it run z80 asm?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-02-08 00:41
    I found this on Thomas Scherrer's site. Good news and bad news. Not having the alternate register is very good news, as those are the instructions that haven't been written yet. But the bad news is there are a few new instructions, eg a load and increment all in one. But - things like that can be changed in the zicog emulation. I've tinkered around inside the zicog code, and it is a matter of understanding PASM. There is a lookup table, so you get the btye for an instruction, and then you can trace this through a lookup table which then jumps to the subroutine that emulates that particular instruction.

    The lack of IN and OUT is interesting. I am wondering how it gets key press input and also how it draws graphics. Maybe with direct writes to graphic memory.

    I think all the building blocks are there, and I think the hardware may well be up to this with one propeller.


    I was just reading your Z80 homepage, and I noticed that you wanted more
    details about the Gameboy CPU. I have a little bit of information that I
    thought you might like.
    
    The CPU is a Z80 workalike running at 4.19 MHz. The CPU has several
    registers missing and some instructions changes. These are as follows:
    
    * The "shadow" set of registers [noparse][[/noparse]BC',DE',HL',AF'] and the index registers
      [noparse][[/noparse]IX,IY] are missing and, consequently, there are no DD and FD opcode
    tables.
    
    * The I/O ports are gone and so are all IN/OUT opcodes.
    
    * HALT is interrupted even when interrupts are disabled.
    
    * Following Z80 opcodes are changed:
    ---------------------------------------------------------------------------
    Code       Z80 operation  GameBoy operation
    ---------------------------------------------------------------------------
    08 xx xx   EX AF,AF'      LD (word),SP     Save SP at given address
    10 xx      DJNZ offset    STOP             Meaning unknown
    22         LD (word),HL   LD (HLI),A       Save A at (HL) and increment HL
    2A         LD HL,(word)   LD A,(HLI)       Load A from (HL) and increment HL
    32         LD (word),A    LD (HLD),A       Save A at (HL) and decrement HL
    3A         LD A,(word)    LD A,(HLD)       Load A from (HL) and decrement HL
    D3         OUTA (byte)    No operation
    D9         EXX            RETI             Enable interrupts and return
    DB         INA (byte)     No operation
    DD         Prefix DD      No operation
    E0 xx      RET PO         LD (byte),A      Save A at (FF00+byte)
    E2         JP PO,word     LD (C),A         Save A at (FF00+C)
    E3         EX HL,(SP)     No operation
    E4         CALL PO,word   No operation
    E8 xx      RET PE         ADD SP,offset    Add signed offset to SP
    EA xx xx   JP PE,word     LD (word),A      Save A at given address
    EB         EX DE,HL       No operation
    EC         CALL PE,word   No operation
    F0 xx      RET P          LD A,(byte)      Load A from (FF00+byte)
    F2         JP P,word      No operation
    F4         CALL P,word    No operation
    F8 xx      RET M          LDHL SP,offset   Load HL with SP + signed offset
    FA xx xx   JP M,word      LD A,(word)      Load A from given address
    FC         CALL M,word    No operation
    FD         Prefix FD      No operation
    ---------------------------------------------------------------------------
    
    Hope this helps,
    
    Pat Fagan
    
    

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

    Post Edited (Dr_Acula) : 2/8/2010 12:46:17 AM GMT
  • VaatiVaati Posts: 712
    edited 2010-02-08 00:44
    Oh--I also got the gameboy boot rom file:

    http://gbdev.gg8.se/wiki/articles/Gameboy_Bootstrap_ROM


    So, do you think that it is possible?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-08 01:10
    Here are some links... (see my signature for others)

    ZiCog (Z80 emulator)· http://forums.parallax.com/showthread.php?p=788511

    TriBlade (hardware)· http://forums.parallax.com/showthread.php?p=786418

    RamBlade (hardware)· http://forums.parallax.com/showthread.php?p=849265

    DracBlade (hardware)· http://forums.parallax.com/showthread.php?p=860453

    Note that currently ZiCog does not do all the Z80 instructions as most programs never used the extra instructions. Wordstar, assemblers,·and the like run. Also, note that there is a lot of software discussions in the hardware threads mentioned as well.

    You may also be interested in the 1-pin versions of the PS2 Keyboard and TV (composite video - B&W of course)

    1-pin Keyboard· http://forums.parallax.com/showthread.php?p=862504

    1-pin TV· (can't find at the moment but it is in the OBEX)

    Sphinx (SphinxOS) is an OS under development for the propeller

    Sphinx· http://forums.parallax.com/showthread.php?p=819353

    Hope these links help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • VaatiVaati Posts: 712
    edited 2010-02-08 01:24
    Thanks--I will check those out.

    As for a screen, I think I may just go with the good old original gameboy screen...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-02-08 01:24
    This thread is now split in two - see also the thread "parallel flash?" particularly the links to gameboy schematics
    devrs.com/gb/files/gameboy1.gif
    and the addon
    devrs.com/gb/files/mbc1.gif

    Let's see.

    The 8k video ram can be internal hub ram.
    The external up to 64k game cartridge can be the standard 512k solutions on the ramblade/dracblade.
    The keypads can be a standard keyboard for the moment as the software exists but down the track could be a HC244 buffer or similar
    The programs can all be stored on an sd card.
    The Zicog needs a few opcodes added but probably could be the 8080 version rather than the Z80 version as there are no alternate registers needed
    The display can be either vga or TV. Cluso has one pin TV. Otherwise VGA which is 8 pins.

    Next decision is hardware. Even though I make the dracblade, I think it may not be the best solution as it is fractionally slow (3.5Mhz emulation vs just over 4 for the gameboy) and also there are no tried and tested VGA drivers (though Bean is getting close with Propbasic). So...

    I'm going to suggest Cluso's new board with the 1 pin TV driver and the 1 pin keyboard and onboard micro sd and 512k ram.

    I think there are a number of TV objects which will be just plugin solutions.
    I think the hardware is all done which greatly simplifies things.
    I think the sd card is going to be the easiest place to store games.

    Stitching it all together is going to be like the dracblade was - ie everything is pretty much written but you have to join it all together - eg feed the keypresses to the right place.
    And there will be the tedious job of emulating about 10 new instructions in pasm.

    Addit: Hmm - you probably want color, don't you. Ok, need to decide 1 pin or 3 pin TV or 8 pin VGA as it affects how many pins you use and that affects some other decisions.

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

    Post Edited (Dr_Acula) : 2/8/2010 1:30:46 AM GMT
  • jazzedjazzed Posts: 11,803
    edited 2010-02-08 01:25
    Dr_Acula said...
    r! But in defence, I think that the concepts in the Z80 emulation are spawning other interesting things, eg pasm overlays for bigger code than 2k in a cog, 300kilobyte programs in C, more memory and the concept of 'Big Spin' programs. And there is huge potential for games that hasn't been exploited yet.
    You mean no one ever thought about any of this before the Z80 emulation threads started popping up? We must be pretty stupid.
  • VaatiVaati Posts: 712
    edited 2010-02-08 01:31
    Dr acula,

    TV!!! I now have a mini tv, and I hate VGA....

    I can't wait to get this working... Imagine--the GBDSO running on a prop.... It would be a Propeller driven oscilloscope! smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-02-08 01:56
    Ok, TV it is, and I'm assuming you want color so that is 3 pins.

    If this is to be a gameboy, I guess that means small. And that might mean a PC keyboard is not quite in the spirit of the game. I see 8 buttons on that controller and there must be a cunning way of getting that down to less pins with resistor networks.

    Ok, 4 pins for sd, 2 for eeprom to boot, 3 for TV, maybe 4 -6 for some buttons. That still leaves more than 15 pins free.

    Let's think outside the square a bit. Maybe you don't need external ram at all? Maybe the core of a program can fit into hub ram as well?

    Or at the very worst, you certainly don't need 512k and maybe you don't even need 64k, as you could page things in and out. And if you did have 64k, well there could be solutions that don't need many latches - maybe at worst one or two.

    Looking at that add-on board, I see a micro, 512k of eprom and 8k of ram. Well, the micro is the propeller, the eprom is an sd card, and does that mean you only need 8k of working memory (plus 8k display ram)?

    This might end up being a quite simple board. sd ram replaces eeprom. ram (if at all possible) is hub ram, and try to reclaim bytes used by cog code eg the zicog emulation.

    zicog's I/O is IN and OUT instructions and these are trapped in spin code in the hub, but it ought to be possible to add instructions that write directly to a hub display buffer. sd code largely sits in its own cog and just handles loading a program into memory. The TV driver code is in another cog. There are some cogs free, so one could be dedicated to reading the buttons. Put the button status somewhere and issue an interrupt flag that the zicog can check each instruction (and/or other software solutions).

    That bootrom code is most interesting. It reads an initial 256 byte program which then does other things, and this is almost identical to the ramblade/dracblade solution where a small 256 byte record is read off the sd card and this kick starts the process. The opcodes and that program are straightforward except for those unique instructions like LD (HL+),A ; $00a3. You can either write the code to trap those opcode bytes and run compiled programs as they are, or, if you are hacking programs at the source code level, maybe a new compiler that splits that opcode into two z80 opcodes? But it would be neater not to have to recompile anything.

    I'm pondering a new design or a hacked current board that evolves into a single prop plus sd plus switches and maybe external ram if needed.

    How big is the biggest gameboy program?

    Also, do you have any examples of code to drive the display. Is it just a matter of writing a byte value to the display ram? If so then that will be quite easy to emulate in pasm.

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

    Post Edited (Dr_Acula) : 2/8/2010 2:10:15 AM GMT
  • VaatiVaati Posts: 712
    edited 2010-02-08 02:04
    The Gameboy color programs are up to 4096kbits.

    I think that it would be best to use an SD game cart and have a multi rom menu (there's a program that does this, I just have to find it and download it) so multiple games can be on one 2GB uSD card.

    I think I am going to merge the thread titled "parallel flash?" with this one, so all the stuff is in one spot...

    Another thing I could do is just ditch the cartridges and make the PropBoy (this is what I have dubbed the project smile.gif ) read the games directly from an SD card... It would be loads easier, because I wouldn't have to deal with all of the reminiscent "parallel excessive pin"-ness... smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-02-08 02:17
    Crossed post there - I added a question about how the ram driver works.

    Ok, 4096 for the program, and 8k for the ram and I think we should be able to shoehorn some glue code into the propeller without any external ram. This frees up a lot of pins - so the keypad is much simpler.

    There is sd card code out there to run a simple operating system

    (as an aside, @Jazzed, yes of course much of this is already thought of. And done. My mistake).

    Maybe start with propdos, but hmm, you don't have a keyboard so scrolling has to be done via those buttons. This might involve some custom code. Suffice to say, talking to sd cards is pretty easy with existing code. At the very least print on the screen a list of files on the sd card with a number next to each one then print a number and you push a button and the number increments and then you push another key to select that game. That then loads the file into hub ram, and if the file is always 4096 bytes, it really could be as simple as one line of spin.

    If the aim is to run unaltered gameboy code, there will be opcodes in there that need the correct offset as they might want to access a byte at location 256 but in hub it exists at location 5256. So there will be a tiny bit of code in the driver that adds the offset to whereever the working ram is.

    This ends up very similar to heaters original zicog which runs CP/M in a propeller with no external ram.

    So, original zicog, use the 8080 opcode set, add a few custom instructions, add TV object, add sd card object, write a driver to talk to some pins, map byte output from gameboy writes to display ram to real display ram that TV object is using.

    Complex. But each step is manageable.

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

    Post Edited (Dr_Acula) : 2/8/2010 2:24:14 AM GMT
  • VaatiVaati Posts: 712
    edited 2010-02-08 02:19
    Oh--the SRAM for game saves is up to 32k...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-02-08 02:24
    What is a game save?

    Specifically, where is it getting 32k of data out of a game running in 4k ?

    Am thinking in terms of 'fast ram' with lots of reads and writes vs 'slow ram' with fewer reads and writes and which can now be on the sd card.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • VaatiVaati Posts: 712
    edited 2010-02-08 02:26
    A game save is a .sav file that basically records the position of the player, and the screen status, etc. It is like a screenshot of the game so it can be reloaded and played from that point.

    Oh!! I think I mis-typed something.... The game roms are up to 4MB...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-02-08 03:18
    Game roms up to 4mb are fine. You can go up to gigabytes on an sd card, and access any byte as needed. Indeed, the code to do that is going to be rather similar to the CP/M driver code that accesses 8mb files. Request byte nnnnnn and it returns a block of data (eg 512 bytes) off the sd card. If games access bytes one at a time, we can buffer them in a 128 to 512 byte buffer. If it reads off in blocks, even better.

    But how big is the working memory for the game in terms of ram. I see two 8k rams on that schematic so am presuming 8k for video ram and 8k for working program ram?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • VaatiVaati Posts: 712
    edited 2010-02-08 03:28
    I honestly don't know....

    I will browse devrs to find out...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-08 03:38
    Looks like you need >=32KB SRAM. You can steal 2 of the upper SRAM address pins from the RamBlade solution, to give the normal 3pin TV color video.

    The keypad interface is the hardest bit, since we have no pins (well we can use the serial in pin). Simplest would be to use another prop, or you could use a cheaper micro. Otherwise you could use a latch or serial decoder.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-02-08 03:47
    Found some info here en.wikipedia.org/wiki/Game_Boy

    8k video ram and 8k working ram. That could well fit internally in a propeller, although you may need to reclaim space after loading cogs. A number of people are working on ways of doing this. It depends on how big the glue spin code is but I am thinking fairly small.

    Worst case scenario might be an external 6264 but even that is one latch and might ?? even be possible with no latches.

    No - on thinking some more, no external ram. Put a whole lot of startup code (eg load cogs, launch sd card) in lower memory, run it, then jump to a higher memory location in spin and keep running in higher ram for the glue code, and then make all of the bottom 8k of ram the video ram. That overwrites bootup code but it isn't needed any more.

    I think 1 pin would be needed for sound.

    Looking at how it works, there are 8 buttons, but one of those is a group of 4 for the direction pad controller, and that is only going to have one of 4 pushed at any one time, so that could reduce down to some dividing resistors and get it into one propeller pin I think. The other group ditto unless you might be pushing two buttons at once.

    I'm still very optimistic this fits in one propeller chip with no external ram. Just a prop, with a TV, sound, sd card and some spare pins for buttons. Hardware wise, I think that is pretty close to a prop demo board.

    And pondering the zicog code, well if there is an instruction that loads A from location (HL) and increments HL, then just capture that in the opcode list, then call the code for LD A,(HL) and then the code for INC HL. So it is a matter of modifying existing code a little rather than writing too much new code.

    The wiki article says an 8080 with some bit operations from the Z80. I'm pretty sure almost every instruction therefore already exists on the zicog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-08 03:52
    Yes, I would agree with Drac, you can probably get this running without external sram. You will most likely need SphinxOS to use less hub and preload drivers for the various things such as the keypad encoder, the video driver, and sound output, and of course the SD driver(s) which can be killed after the code is loaded.

    SO, I think your issues will be just getting the software running.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • VaatiVaati Posts: 712
    edited 2010-02-08 03:54
    For the buttons, could I use an NES controller? (hacked into a smaller case, of course) smile.gif
    I think it would work, and drivers are already written...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • heaterheater Posts: 3,370
    edited 2010-02-08 15:41
    Vaati: A game boy from the ZiCog Z80 emulator is a great idea.

    Looking at the list of changed opcodes for the gameboy processor by Pat Fagan above it looks like a bit of work is required to make those changes to ZiCog. Better to fork ZiCog into a gameboy project, throw away all the CP/M stuff and hack the emulation into gameboy shape.

    Good news here is that all the I/O instructions and a bunch of other ops are to be removed so we might gain some COG space to play in.

    Bad news is that there are a hand full of Z80 ops that ZiCog does not handle just now. We are running out of room to squeeze them in. Mostly we don't worry as the CP/M systems we have running don't use Z80 ops.

    But if we can delete some ops for the gameboy version then maybe it will make it easier to get those missing ops working

    If you get serious about doing this I'll dig out our Z80 exerciser test results again and pinpoint what is missing in ZiCog just now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-02-08 16:11
    Then the Nascom might rise again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • VaatiVaati Posts: 712
    edited 2010-02-09 14:42
    Heater,

    Sorry about the long wait--it would be great if you could check what needs to be done to make it happen.

    Also, I think I remember someone asking what is in a sav file. I got a basic overview here on sav files in general: http://www.computerfileextensions.com/file-extensions.php/SAV

    I will look around google to see if there is information specifically on gameboy sav files and how they work. I might also run an emulator on my computer and take apart the game... [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
  • Ahle2Ahle2 Posts: 1,178
    edited 2010-02-09 16:12
    A save file is basically just a snapshot of the current states of all the emulated chips/hardware including work RAM.
    The ROM (the game code itself) is not part of the snapshot of course, because it will never change anyway.
    When you load a save file, the emulator just "fills" the hardware with the snapshot data.
  • VaatiVaati Posts: 712
    edited 2010-02-12 15:40
    Heater, did you check the opcodes yet? I would love to get this up and running....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
Sign In or Register to comment.