Shop OBEX P1 Docs P2 Docs Learn Events
Turning an SX28 into a ROM chip — Parallax Forums

Turning an SX28 into a ROM chip

cbmeekscbmeeks Posts: 634
edited 2005-08-19 17:58 in General Discussion
Ok, I am building a 6502 based computer. The 6502 needs ROM to work. I can't afford a EPROM burner but I have a few SX28s around.

Anyway, here is my idea of turning an SX28 into a ROM chip that the 6502 can read. Please let me know what you think (try not to laugh too much!)

1) Take PortC as the data bus (all outputs)

2) Make PortA and PortB the address bus (all inputs).


Now, I know that would only be 12 pins address bus which is 4k. I also realize I would lose some for the coding logic.

But even if I got a good 1k of usable ROM, that would be enough for some neat programs.

So, I thought of having the SX detect the inputs as a binary address and then jump to a location in FLASH memory and output on the databus.

What do you think? Am I crazy? lol

Thanks!

cbmeeks


EDIT:

Another idea I had would be to simply take an SX28, write to 2k of a 32k SRAM chip I have, and then turn off the SX. This might actually be a better idea...LOL

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://metroidclassic.com

=========
DMCA Sucks
RIAA Sucks

Comments

  • BeanBean Posts: 8,129
    edited 2005-08-19 15:13
    Should work.

    MOV W,RA
    INC W ; make sure option register is setup for RAM location $00 = W
    MOV M,W
    MOV W,RB
    IREAD
    MOV RC,W

    Be sure to increment the value in RA so 6502 address $000 = $100 in sx code space.
    This is because the reset location must be in the first page of memory, so I would just skip the whole first page.
    This would give you 256 words for the code and 1.75K to address.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • PJMontyPJMonty Posts: 983
    edited 2005-08-19 15:20
    Definitely a unique solution. Still, given the 6502 is running at 1 MHz and the SX at 50 Mhz, you have at least 50 SX instructions to get data ready. I can't remember the timing specs on the 6502 bus, but I think you'll have enough time for setup, etc.
      Thanks, PeterM
  • cbmeekscbmeeks Posts: 634
    edited 2005-08-19 15:50
    Bean:

    Thanks...1.75k is plenty for a crude OS system. Especially since my display/audio are in dedicated SX MCUs. This would not be a perminant solution but something to work out until I can get a good EPROM burner or some type of FLASH memory writer for ROM.

    PJMonty:

    Yeah, I am a little proud that I thougt of it...hehehe. I'm sure others have done it but I just KNEW that it could be done...poor man's ROM...hehehe

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://metroidclassic.com

    =========
    DMCA Sucks
    RIAA Sucks
  • BeanBean Posts: 8,129
    edited 2005-08-19 17:04
    Even better (I keep forgetting about these extended MOVe commands)


    Again:
    · MOV W,++RA ; (1)
    · MOV M,W ; (1)
    · MOV W,RB ; (1)
    · IREAD ; (4)
    · MOV RC,W ; (1)
    · JMP Again ; (3)

    Looks like 11 cycles will do it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • cbmeekscbmeeks Posts: 634
    edited 2005-08-19 17:10
    cool! thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://metroidclassic.com

    =========
    DMCA Sucks
    RIAA Sucks
  • IbsenIbsen Posts: 68
    edited 2005-08-19 17:55
    Don't you need one pin for CS (Chip Select) ???




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    *.*

    Ibsen

    " It's nice to be important, but
    ·· more important to be nice... "
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-19 17:58
    How about using the SX to program a (E)EPROM? Using a serial link you can fill the entire memory.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
Sign In or Register to comment.