Shop OBEX P1 Docs P2 Docs Learn Events
C64 ROM Loader — Parallax Forums

C64 ROM Loader

GoogGoog Posts: 65
edited 2006-08-11 11:03 in Propeller 1
Hi everyone,

Sorry it's·taking so long·with my C64 emulator - I've been waiting on parts and trying to get things working.

I am posting my ROM loader here in its own topic because it seems to work for the most part, but I am having trouble in one area.· Any input would be appreciated.

The program basically loads a binary file at compile time and copies it to an EEPROM on my demo board (rev. c).· My EEPROM is a Ramtron chip, connected to pins 5 and 6.· The program seems to write to it just fine.· Reading back the values works fine, too.

The problem is that when I try to write to any address, the values written seem to start at address $0001 on up again - overwriting anything that was already there.· For instance, if I copy the ROM file to $A000-$AFFF and then try to write data to $E000-$EFFF, the writes seem to go to where I wrote $A000.· What I think is happening is that the writes are just going·to $0000, no matter what address I specify.

Any ideas?

Thanks,
Goog


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

Doing my part to keep the Commodore 64 alive!

http://www.commodorestuff.com

Comments

  • GoogGoog Posts: 65
    edited 2006-08-10 00:15
    Here's a thought... I was reading through the documentation on the Ramtron chip (see link below)... not that I understand most of it, but... I noticed on page 3 (under Memory Architecture) and page 5 (under Addressing Overview)·that it said something about only using 13 of the 16 address bits? Does that mean I cannot address the full 64K range? It also states on page 5 that after reaching the last address of 1FFF that it will roll over to 0000 again.· I would expect it to roll over after reaching FFFF.· Or is this talking about something other than the virtual addresses (0000-FFFF) I am trying to use?

    See spec sheet here:
    http://www.ramtron.com/lib/literature/datasheets/FM24CL64ds_r3.1.pdf

    Goog

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

    Doing my part to keep the Commodore 64 alive!

    http://www.commodorestuff.com
    ·
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-08-10 00:19
    It's the ol' bits versus bytes thing again. The Ramtron device is a 64Kbit memory. Its capacity is 8K bytes.

    -Phil
  • GoogGoog Posts: 65
    edited 2006-08-10 00:28
    AARRRGH! Just when I thought I was making progress! When you look at their first Web page, it simply says 64K.· I never noticed it said 64Kb in subsequent pages or anywhere else, for that matter.

    I guess I'll have to order·two of their·FM25L256 - 256Kb and link them together to form 64KB·- does that sound right?

    http://www.ramtron.com/doc/Products/Nonvolatile/Detail.asp?ID=31&gr=5

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

    Doing my part to keep the Commodore 64 alive!

    http://www.commodorestuff.com
    ·
  • GoogGoog Posts: 65
    edited 2006-08-10 00:40
    BTW-Thanks, Phil, for noticing that - I'm sure it saved me (and probably others) many hours of figuring it out. [noparse]:)[/noparse]

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

    Doing my part to keep the Commodore 64 alive!

    http://www.commodorestuff.com
    ·
  • JavalinJavalin Posts: 892
    edited 2006-08-10 10:23
    Goog,

    Glad to see the issue has been solved! While you are waiting for the new chips, you can at least get the code running with a 1k or so block to test

    James
  • GoogGoog Posts: 65
    edited 2006-08-10 18:40
    I think the code works fine - I am able to write to and read from the 8K chip just fine. I also tested the fact that it retains the data after power-off, so I think it is good.

    By the way, anyone could use this program to load their EEPROM with any file (within max space of the chip) from their PC - not just C64 ROM files.

    I ordered my chips yesterday. I can hardly wait!!!

    Goog

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

    Doing my part to keep the Commodore 64 alive!

    http://www.commodorestuff.com
    ·
  • JavalinJavalin Posts: 892
    edited 2006-08-11 11:03
    Goog,

    Good stuff - when I've got more time - aka next month i'll be looking at your emulator in more detail! I always loved the C64.... I'd like to make a min one I can play with, i.e. small lcd-tv, mmc card etc....

    James
Sign In or Register to comment.