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

Propeller Powered Gameboy

2

Comments

  • VaatiVaati Posts: 712
    edited 2010-02-15 17:07
    Hmmm...

    I'm trying to cobble some code together with my limited ASM knowledge and see what I can do to get that boot ROM converted to prop ASM/SPIN...
    That brings up another possibility--instead of trying to get it all to prop assembly, why not try to get some of the more obscure instructions into spin?

    EDIT: I also found all the Gameboy opcodes: http://www.semis.demon.co.uk/Gameboy/images/Opcodes.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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 5:43:33 PM GMT
  • VaatiVaati Posts: 712
    edited 2010-02-15 20:23
    Aha!

      The GameBoy uses a computer chip similar to an Intel 8080.
    It contains all of the instructions of an 8080 except there
    are no exchange instructions. In many ways the processor is
    more similar to the Zilog Z80 processor. Compared to the
    Z80, some instructions have been added and some have been
    taken away.
    
    The following are added instructions:
    
      ADD  SP,nn             ;nn = signed byte
      LDI  (HL),A            ;Write A to (HL) and increment HL
      LDD  (HL),A            ;Write A to (HL) and decrement HL
      LDI  A,(HL)            ;Write (HL) to A and increment HL
      LDD  A,(HL)            ;Write (HL) to A and decrement HL
      LD  A,($FF00+nn)
      LD  A,($FF00+C)
      LD  ($FF00+nn),A
      LD  ($FF00+C),A
      LD  (nnnn),SP
      LD  HL,SP+nn           ;nn = signed byte
      STOP                   ;Stop processor & screen until button press
      SWAP r                 ;Swap high & low nibbles of r
    
    The following instructions have been removed:
    
      Any command that uses the IX or IY registers.
      All IN/OUT instructions.
      All exchange instructions.
      All commands prefixed by ED (except remapped RETI).
      All conditional jumps/calls/rets on parity/overflow and sign flag.
    
    The following instructions have different opcodes:
    
      LD  A,[noparse][[/noparse]nnnn]
      LD  [noparse][[/noparse]nnnn],A
      RETI
    
    

    I got this from http://www.semis.demon.co.uk/Gameboy/Gbspec.txt
    How would I add the new opcodes to the Z80 emulator?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-16 01:46
    Those opcode should be easy enough to do. However, it would be a different object. You really cannot match spin and pasm the way ZiCog works.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-16 03:48
    >How would I add the new opcodes to the Z80 emulator?

    You will need to be thinking clearly. Has anyone except heater and myself managed to add opcodes?

    Anyway, I think you need a working version that is booting up into CP/M first as some of the CP/M programs are very handy.

    I then went and got a simple compiler eg m80 and tested individual opcodes eg this is the one I used for EXX
    ; changing from tasm mnemonics - replace all $nn with nnH
    ; remove . in front of equ
    ; remove : in equ lines
    ; must have a CR/LF after END
    ; use zasm.sub with supersub
    ; eg supersub zasm myfile    (where myfile is called myfile.mac but do not put the
    ;                             mac in the instruction - m80 knows it is implied)
    ; zasm.sub is the following two lines
    ;M80 =$1 /Z/C/L/M
    ;L80 $1,$1/N/E
    
    
    MAIN:    LD    A,1
        LD    B,2
        LD    C,3
        HALT
        EXX
        HALT
        EXX
        HALT
        RET                ; back to CP/M
        END
    
    



    You then need to dump the registers, so you can see what happened. HALT does that.

    But opcodes from the gameboy won't compile with M80, so you might end up running MBASIC and poking some opcode values into memory somewhere then jumping to them.

    Then add that instruction to the overlay list
    #ifdef CPU_Z80
      alu_neg_ovl_ := OverlayParams(@alu_neg_ovl, @alu_neg_ovl_end)
      alu_sla_ovl_ := OverlayParams(@alu_sla_ovl, @alu_sla_ovl_end)
      alu_sra_ovl_ := OverlayParams(@alu_sra_ovl, @alu_sra_ovl_end)
      alu_srl_ovl_ := OverlayParams(@alu_srl_ovl, @alu_srl_ovl_end)
      alu_bit_ovl_ := OverlayParams(@alu_bit_ovl, @alu_bit_ovl_end)
      alu_res_ovl_ := OverlayParams(@alu_res_ovl, @alu_res_ovl_end)
      alu_set_ovl_ := OverlayParams(@alu_set_ovl, @alu_set_ovl_end)
      ex_af_af_ovl_:= OverlayParams(@ex_af_af_ovl,@ex_af_af_ovl_end)
      exx_ovl_     := OverlayParams(@exx_ovl,     @exx_ovl_end)
      ireg_ovl_    := OverlayParams(@ireg_ovl,     @ireg_ovl_end)
      ' ... add more z80 overlays as required
    
    



    and write the instructions to do that opcode
    'exx overlay.
                            org     OVERLAY_START
    exx_ovl                 mov data_16,c_reg         ' happens to be 0 ie regbase
                            add data_16,#8            ' data_16 now points to the alt BC reg
                            rdword data_8,c_reg       ' get BC into data_8 (messy as storing 2 bytes in data_8)
                            rdword temp1,data_16      ' BC' to temp1
                            wrword data_8,data_16     ' BC to BC'
                            wrword temp1,c_reg        ' BC' to BC
                            add data_16,#2            ' point to DE'
                            rdword data_8,e_reg       ' get DE into data_8
                            rdword temp1,data_16      ' DE' to temp1
                            wrword data_8,data_16     ' DE to DE'
                            wrword temp1,e_reg        ' DE' to DE
                            add data_16,#2            ' point to HL'
                            rdword data_8,l_reg       ' get HL into data_8
                            rdword temp1,data_16      ' HL' to temp1
                            wrword data_8,data_16     ' HL to HL'
                            wrword temp1,l_reg        ' HL' to HL
    
                            jmp     #fetch
    
    
    
                            long    $0[noparse][[/noparse]($ - OVERLAY_START) // 2]    'fill to even number of longs (REQUIRED)
    exx_ovl_end
                            fit     $1F0
    
    



    and add that opcode to the CON list
    CON
    'Overlay numbers.
    'Note: These overlay numbers must be the in the order of the overlay param
    '      entries in the overlay_table.
    daa_ovl_no     = $00
    ldi_ovl_no     = $01
    cpi_ovl_no     = $02
    ini_ovl_no     = $03
    outi_ovl_no    = $04
    ldd_ovl_no     = $05
    cpd_ovl_no     = $06
    ind_ovl_no     = $07
    outd_ovl_no    = $08
    ldir_ovl_no    = $09
    cpir_ovl_no    = $0A
    inir_ovl_no    = $0B
    otir_ovl_no    = $0C
    lddr_ovl_no    = $0D
    cpdr_ovl_no    = $0E
    indr_ovl_no    = $0F
    otdr_ovl_no    = $10
    out_ovl_no     = $11
    in_ovl_no      = $12
    alu_neg_ovl_no = $13
    alu_sla_ovl_no = $14
    alu_sra_ovl_no = $15
    alu_srl_ovl_no = $16
    alu_bit_ovl_no = $17
    alu_res_ovl_no = $18
    alu_set_ovl_no = $19
    ex_af_af_ovl_no= $1A
    exx_ovl_no     = $1B
    ireg_ovl_no    = $1C
    
    



    and add it to the overlay table
    
    DAT
    ' Table of overlay parameters.
    ' Note: The overlay numbers defined in CON must be in the order
    '       of the param entries here.
    overlay_table
    {00}daa_ovl_            long    0-0                        '\\ parameters for overlays (preset by spin code)
    {01}ldi_ovl_            long    0-0                        '||   bits 31..16 = hub END+3 address (must be even length)
    {02}cpi_ovl_            long    0-0                        '||   bits  8..0  = cog END address
    {03}ini_ovl_            long    0-0                        '||
    {04}outi_ovl_           long    0-0                        '||
    {05}ldd_ovl_            long    0-0                        '||
    {06}cpd_ovl_            long    0-0                        '||
    {07}ind_ovl_            long    0-0                        '||
    {08}outd_ovl_           long    0-0                        '||
    {09}ldir_ovl_           long    0-0                        '||
    {0A}cpir_ovl_           long    0-0                        '||
    {0B}inir_ovl_           long    0-0                        '||
    {0C}otir_ovl_           long    0-0                        '||
    {0D}lddr_ovl_           long    0-0                        '||
    {0E}cpdr_ovl_           long    0-0                        '||
    {0F}indr_ovl_           long    0-0                        '||
    {10}otdr_ovl_           long    0-0                        '||
    {11}out_ovl_            long    0-0                        '||
    {12}in_ovl_             long    0-0                        '||
    {13}alu_neg_ovl_        long    0-0                        '||
    {14}alu_sla_ovl_        long    0-0                        '||
    {15}alu_sra_ovl_        long    0-0                        '||
    {16}alu_srl_ovl_        long    0-0                        '||
    {17}alu_bit_ovl_        long    0-0                        '||
    {18}alu_res_ovl_        long    0-0                        '||
    {19}alu_set_ovl_        long    0-0                        '||
    {1A}ex_af_af_ovl_       long    0-0
    {1B}exx_ovl_            long    0-0
    {1C}ireg_ovl_           long    0-0
    
    



    and add it to the opcode number list
    {D9}                    long    vector_overlay     + (exx_ovl_no          << 9)   
    
    




    Those are the basic steps - hope this helps!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • VaatiVaati Posts: 712
    edited 2010-02-16 15:10
    Ok--So, is the Z80_instructions.txt file from the Z80 emulator that cluso linked a list of all the instructions supported by the emulator?

    I can sort of follow your code--but I have no clue what some of those things mean... I take it M80 is a Z80 compiler, so MBASIC must be a Z80 basic IDE...
    So, you think that I should just use MBASIC? Or do you think it's possible otherwise?

    One thing that I have learned over my many hours on these forums is that if someone wants code, all they can get is help to write the code themselves. 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!
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-16 17:04
    Vaati: At the moment I am busy with other software. I think heater and drac may be busy as well.

    So I guess you are going to have to dive in and have a go!

    Here is my latest ZiCog (Z80 emulator section). Drac has a later version with some extra opcodes he has added. If you take a look at how similar instructions work. Then maybe write a similar piece for the instructions you require in a seperate file, perhaps heater, drac or I may be able to find the time to add them into a Gameboy emulator. However, I am unsure if this is all that will be required to get the Gameboy emulation running, but it will be a start.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-16 17:09
    Ok--thanks for all of the info... I will try and sort it and get some code together. smile.gif

    One final question--once I get all the opcodes in the emulator, would I have the actual gameboy boot ROM use the emulator as an object and add in the SD routines to the gameboy boot rom, or could I simply have the Z80 emulator include the gameboy boot rom, and add the SD routines and all? The one thing that I think will be a problem is the 32k memory limit....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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!
  • blittledblittled Posts: 681
    edited 2010-02-16 17:12
    M80 and MBASIC are programs that run in CPM and are Command line based. I programmed in MBasic at my first programming job (back in the stone ages) on a CPM Computer. We also had a IBM XT that I programmed with BasicA. My boss wouldn't get the new fangled IBM AT! [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Will work for Propeller parts!
  • heaterheater Posts: 3,370
    edited 2010-02-16 17:36
    Vaati: Sorry to be so slow replying. Too much to do.

    I haven't exactly pinpointed the missing ops from ZiCog yet. You are not the the only one who wants to know. How ever that does not seem to be so important for the Game Boy. More on that below.

    DO NOT Trust that Z80_instructions.txt file as an indicator of what works or not. I only put that there as something to work from.

    Have you got a ZiCog and CP/M set up working on a TriBlade or such? That would be the first step. So you you know you have a working base to start from.

    M80 is the Z80 assembler from MicroSoft. MBASIC is MicroSoft BASIC. You may need one or other for testing opcodes after you have implemented them.

    That list of added/removed/changed instructions is nice but where are the actual opcode numbers?

    A BIG suggestion. Download the source code of the GEST Gameboy Emulation SysTem.
    koti.mbnet.fi/gest_emu/

    Have a good read of it. It must surely have all the required ops so you can use the GEST implementaion as definitive guide as to what they are and how they work. The ops are implemented in the the GEST file cpucore.h.

    From a quick look at GEST it seems you may be in luck. Unless I'm missing a point the GameBoy does not have any instructions with a Z80 style prefix of DD, ED or DDCB. So you can remove the dispatch tables for them from ZiCog and all the code that implements them !

    Also I can't find any existence of the IX or IY registers in that GEST code. So you can remove all the ops that deal with them.

    I suggest you create a new version of ZiCog.spin (say GbCog) and start removing all this stuff from it. Keep many versions of it and test that CP/M runs after each change. Do NOT remove any ops that are NOT between

    #ifdef ZPU_Z80
    #endif

    statements. That will surely break CP/M.

    You should do a check of how the GEST GB code sets the processor flags for each instruction. Looks like you can remove some unnecessary flag setting code from ZiCog.

    With all that done you should find you have some COG space to work in for adding/changing opcodes for the GB.














    "if someone wants code, all they can get is help to write the code themselves". Educational, isn't it [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • VaatiVaati Posts: 712
    edited 2010-02-16 17:44
    Ok--I do not have a Bladed prop system... My idea was to get this going on a setup similar to the PropModule...

    Do you think I should get a bladed prop? I have the money, but I just don't know if it's worth it...
    And--how does the Zicog emulator actually work? Does the Z80 file that you are trying to run use it in the OBJ routine...?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-16 17:45
    Vaati. I am almost certain you will need external memory to get the space required for the GameBoy to run in. Get yourself a TriBlade, RamBlade, DracBlade board or some such.

    When you are ready to run GB Boot ROMs the ZiCog emulator can be modified to do that. It will:
    1) Load the boot ROM binary blob from an SD card file.
    2) Place the binary data into the correct place in external memory.
    3) Start the actual GB processor emulation and it will run the boot code.

    We already do something similar for loading the boot ROM area for CP/M so it should be easy to adapt.

    Then we can worry about how the games get loaded by the boot code. Which I know nothing about yet. Again the GEST system can help there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • VaatiVaati Posts: 712
    edited 2010-02-16 17:59
    Will it work with the RAMBlade? It's the cheapest and I think it has a nice, small size, and is exactly what I had in mind.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-16 18:01
    No the Z80 file/program we are running knows nothing of PASM or Spin or Objects or even that it is sitting in a Propeller.
    After all as far as it is concerned it is sitting in the memory of a Z80 computer. If not we have done something wrong!

    Put simply the Z80 program is just data as far as the ZiCog is concerned. In our case data that is sitting in the first 64K of the external memory. There is an emulation loop (look for lable "fetch" in zicog.spin) which reads a Z80 op from wherever the emulated Z80 Program Counter is pointing to in external memory. The fetched op code is used as an index into a table in HUB that contains addresses of PASM routines in COG that are called to emulate that op code. When the emulate work is done the Z80 Program counter now points at a new instruction and we go around the loop again.

    For many ops the dispatch table in HUB contains three 9 bit COG addresses of PASM routines. This is because generally there is a pattern to the Z80 instructions:
    a) Get some data, from register or memory
    b) Do some operation, add, sub move etc
    c) Write the result somewhere

    By writing little "micro-operation" functions to do those basic steps we can use them in many different combinations in order to implement all the different instructions. The different combinations are spelled out in the dispatch table entries.

    Hope that sheds some light on what goes on in ZiCog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • heaterheater Posts: 3,370
    edited 2010-02-16 18:05
    Have you thought about the display for the GameBoy Prop?

    I presume for the RamBlade we can get a 256*256 TV display out somehow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-17 01:50
    Vaati: There are two things you need to resolve..

    What display are you going to use (small LCD, TV)?

    What input are you going to use (keyboard, buttons)?

    IIRC Gameboy was 4 greyscales which will require 2-pin TV unless we can find a trick to do this on a 1-pin TV.

    Gameboy had a few pushbuttons. If you use a PS2 keyboard we can do 1-pin version OK.

    Since Gameboy only requires 64KB we can steal 3 pins from the RamBlade memory (will require a pcb modification).

    Do you know what clock speed the Gameboy ran at? I suspect a latched design may well be too slow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • SapiehaSapieha Posts: 2,964
    edited 2010-02-17 05:51
    Hi All.

    It is not so simple to emulate GameBoy. BUT not imposible

    1. Display driver are inbuild in CPU.
    2. It is not Z80 CPU --- It is 8085 subset with some special instructions.
    3. Memory banking for Display are hardware driven.

    Regards
    Christoffer J

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-17 06:11
    Sapieha:

    1. Do you have a simple explanation of how the display driver works???
    2. Z80 vs 8085: So it is not a Z80/8080 base with some extra instructions ? (For Vaati... the 8085 is not an 8080 or Z80!!)
    3. Probably we could emulate the memory banking once it is understood what instructions switch it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • SapiehaSapieha Posts: 2,964
    edited 2010-02-17 06:17
    Hi Cluso99

    I have most info of GameBoy to hack it.
    Have complete CPU instructions set and hardware info's on both GameBoy and Game cards.
    BUT as I said IT NOT need Z80 instructions only 8080 + some extra specific instructions

    Regards
    Christoffer J

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-17 06:32
    OK Sapieha. I thought you said it was 8085 based which is not an 8080 (if my memory serves me correctly). I think the 8080 instructions were complete, so it would only be the extras 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
  • SapiehaSapieha Posts: 2,964
    edited 2010-02-17 06:39
    Hi Cluso99

    I always refer to 8085 not 8080 as them in subset of instructions are same.

    Extras comme in same places as 8085 else Z80's space of extra instructions.
    Display driver are hardware refresh driven with separate memory bank.

    Regards
    Christoffer J

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • heaterheater Posts: 3,370
    edited 2010-02-17 07:46
    Cluso. The differences between 8080 and 8085 are minimal from an instruction set point of view. ZiCog can handle all of that easily.

    There are some differences with how flags are set between 8085 and Z80. Currently we do Z80 style even if yo set the CPU_8080 define.

    Sapieha: ZiCog can do banked memory OK. The code is in place already. I don't think anyone has tested it yet.

    One thing that worries me a little is the lack of I/O instructions on the Game Boy. Everything is memory mapped which means we have to check for memory or peripheral during every memory access. This is a speed hit.

    No idea how fast the Game Boy ran or how fussy it is about timing. Not sure if we have enough horse power. If not it's OK for the PropII [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • SapiehaSapieha Posts: 2,964
    edited 2010-02-17 09:11
    Hi Cluso99, Heater.



    Some info on GameBoy.

    Have litle more if needed.

    Look on attachment's

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha

    Post Edited (Sapieha) : 2/17/2010 9:16:56 AM GMT
  • SapiehaSapieha Posts: 2,964
    edited 2010-02-17 09:15
    Hi. More attachment's


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
    557 x 347 - 6K
    376 x 497 - 5K
  • VaatiVaati Posts: 712
    edited 2010-02-19 19:59
    Thanks for all the docs and info, Sapieha.

    I have been working on Pre-calculus this entire week and I'm still not done... I might be able to get back to this next week and order a bladed prop.

    In the meantime, I got myself a Gameboy Advance reprogrammable cartridge, and I found an NES, SNES, and original Gameboy emulator for it. If the propeller could emulate that system, I think that all of the previous systems would be trivial from there. It may have to wait until the Propeller MkII is out though for the extra processing power.... 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!
  • SapiehaSapieha Posts: 2,964
    edited 2010-02-19 21:35
    Hi Vaati.

    If You need I have even SCH to Cardiges with diferent Banking IC's.
    And some info how that IC's works

    Regards

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • VaatiVaati Posts: 712
    edited 2010-03-09 22:41
    http://www.oshonsoft.com/8085.html

    I found this while looking for an AVR basic compiler. smile.gif It's a simulator for the 8085, which is what the Gameboy is. I was running the Gameboy boot rom through it just now, and I did notice that there are 2 unrecognized instructions...

    I really don't feel like spending $40 on a RAMblade prop, so I want to make one out of the Propmod. The uSD card could contain all the files, so I think it would be plausible.

    On a slightly related topic, I got a DS flash cart yesterday, so I can start messing around with DS development! 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!
  • pullmollpullmoll Posts: 817
    edited 2010-03-09 22:50
    Vaati said...
    http://www.oshonsoft.com/8085.html

    I found this while looking for an AVR basic compiler. smile.gif It's a simulator for the 8085, which is what the Gameboy is.

    Umm.. I beg to differ. The Gameboy Z80 hasn't much to do with the 8085. It's closer related to the Z80 and yet has many differences.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    He died at the console of hunger and thirst.
    Next day he was buried. Face down, nine edge first.
  • heaterheater Posts: 3,370
    edited 2010-03-09 23:12
    Hmm.. I beg to differ. Seems to me the Gameboy CPU started out as an 8085 architecture and had a few Z80 things bolted on and then some other quirks added. Admittedly I did not look into it so hard. Either way it's enough different from either of them that it would require quite some research and work.

    From my brief look it would a appear that taking ZiCog and hacking into Gameboy shape would not be so unreasonable.
    Not sure if the result would get you a Gameboy on the Prop though, there must be a lot of other hardware things to consider.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • VaatiVaati Posts: 712
    edited 2010-03-09 23:45
    So, what do you think will be the result--is it possible to get the gameboy on the prop?

    And, is is possible to get this on one of mctrivia's propmods?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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!
  • SapiehaSapieha Posts: 2,964
    edited 2010-03-10 00:13
    Hi Vaati

    As I can see it is posible - Maybe not easy.
    That GameBoy CPU have some EXTRA hardware to drive directly Display from memory that have dedicated addresses.
    And some other odities. Other thing that You need consider are emulating Data Bus to Cardiges else emulating Cardige addres space controler's.
    As not entire Cardriges address space are directly addressed in Procesor but as BANK's of memory

    Regards
    Christoffer J

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
Sign In or Register to comment.