Commodore 64 Emulator
Goog
Posts: 65
It just has to be done... I am working on a Commodore 64 emulator using the Propeller.· I had been writing it in .NET for the PC, but that venture wasn't working out - .NET just isn't fast enough.· The moment I saw the first Propeller article in Nuts and Volts, I knew this would be the perfect platform for an emulator.· So that is why I bought the demo board and I have already started emulating.
Is anyone interested in joining me on this? I will need some help in the sound emulation and possibly the video - perhaps at its lowest-level programming, since I have no experience with video and sound electronics and/or theory.
I've gotten a large chunk of the Commodore's processor (the 6510) emulated and have already started porting over the top-level engine that will end up putting it all together.
The C64 runs at 2MHz, first driving a chip called the VIC-II, which then splits the 2MHz signal in half, which drives the 6510 at 1MHz.· It seems like the Propeller would be perfect to "multi-process" this using 2 or more COGs.· Of course, there are other chips and functions, which will all need to be emulated.
Thoughts? Comments? Does anyone know and love the C64 as much as I do? Thanks for looking.
Goog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
Is anyone interested in joining me on this? I will need some help in the sound emulation and possibly the video - perhaps at its lowest-level programming, since I have no experience with video and sound electronics and/or theory.
I've gotten a large chunk of the Commodore's processor (the 6510) emulated and have already started porting over the top-level engine that will end up putting it all together.
The C64 runs at 2MHz, first driving a chip called the VIC-II, which then splits the 2MHz signal in half, which drives the 6510 at 1MHz.· It seems like the Propeller would be perfect to "multi-process" this using 2 or more COGs.· Of course, there are other chips and functions, which will all need to be emulated.
Thoughts? Comments? Does anyone know and love the C64 as much as I do? Thanks for looking.
Goog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
Comments
I'd suggest that the large number of friendly & helpful people on this forum would be willing the to assist. Perhaps the best way is for you to continue; post any specific questions here and I'm sure somebody will be able to help!
The C64 was cool - I allways got frustrated with the slow & unreliable load-from-tape so as long as you don't emulate that im sure it will be cool!
Rokicki has done a Tandy computer emulator - might be worth checking it out. http://forums.parallax.com/forums/default.aspx?f=25&m=126292&p=1&ord=d
James
I would be interested to see this carried out.
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
SYS 49152
It's a 1541-Disk emulator that I'd really, really, really...
I met someone who was going to develop a hardware device that plugs into the C64's I/O chip socket (that's right - the socket) which would control the serial port and emulate the 1541 on-chip.· Pretty wild - I don't know what his progress is, but I might find out in July at the Las Vegas Commvex (Commodore Expo).· I hope to have my "Prop64" developed by then.
So here is my first challenge: Memory.· I'm thinking of attaching an EEPROM to my dev. board to handle the C64 ROMs and RAM area.· Since the C64 needs 64K to work with, it would be ideal to just manage that memory in another chip.· Any suggestions on what chip to get? Perhaps a serial EEPROM that a COG could communicate with?
I'll be posting my first code soon... hang in there.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
EEPROM - thats easy! Get another of the 24L256 type 32k EEPROM's that the Propeller uses as its program storage. Download my i2cObject from the object library and walla.
If you want bigger (Multi-Media Card) type storage wait a few weeks and i'll be publishing it.
You could easily write an object to make a virtual block of 32K ram using an EEPROM. Using multiple (up to 8) you could extend this to 256K! You wouldn't be able to use it for your Propeller App but your interpreter could be written to make use of it....
James
bytValue := objBus.ReadByte(Address)
objBus.WriteByte(Address, Value)
The Bus object would basically propogate that to another object that reads and writes from/to the external memory chip/card.· It could be anything from an attached USB device (with an SD card, for example) or even an EEPROM on the circuit board (or breadboard).
This is something I'd like help with, if anyone is willing to spell it out for me.· I do have a 32MB TransFlash card (with an SD adaptor)·that would be nice to use - is that something easily doable? Can the demo board utilize its built-in USB port to do these reads and writes? Any other ideas?
I'm almost ready to publish my first code - but the memory limits are stopping me from testing it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
They put core on chips now?
Cannot help with the SD card - dont have any code for this. In a week or so when I have completed and tested it - I will be posting a MultiMediaCard object that allows you to use a 1GB card (currently testing with a 256MB card!)
This isn't ideal for RAM emulation - the RAMTRON link from Mike looks then best option. I'd be happy to try to help with this - baring in mind I would'nt have a ramtron chip to play with. (the all seem to be surface mount....)
James
Then you could build a library of games and programs and just change the module like the GameBoy etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*.*
Ibsen
" It's nice to be important, but
·· more important to be nice... "
I'm actually fine with a less-superior RAM emulation at this point, just so I can test things.· I need to be able to read and write from memory - even if the performance isn't perfect.· Then, when I get things stable in the emulator, I can find the best solution.
·
The Ramtron looks good - I'll see if I can find an adaptor for their surface mount chips.· Also, working with the multimedia card will be fine as long as I can get the accompanying hardware to plug it into my breadboard.· What are you using to hook it up, James? Maybe post a photo?
Yes, I plan on having the ability to have some sort of media, such as an SD card, with pre-loaded .d64 files (these files are single-file equivalents of disks on the 1541).· Or even just using an EEPROM, loaded up with whatever you want.· The emulator would be able to display a list of files available and then you could load the file you want.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
OK leave the ram bit with me I'll get a couple of EEPROM's hooked up and get a large RAM object underway! This should be easily adaptable to use the Ramtron bits
The MMC card is connected using a reduced size manual connector - such as http://uk.farnell.com/jsp/endecaSearch/partDetail.jsp?SKU=8755574&N=401
I'd expect (work commitments etc not withstanding..) to have a RAM object mid next week.
James
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
Now, I could probably store the·two 8K ROMs in the EEPROM without writing to them, but that still leaves ~48K of memory that will need to be written to frequently.
I'm more than happy to try the MM card (or SD or whatever).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
If the RAM behaves like a normal i2c EEPROM an object written for the EEPROM would work on the RAM
James
The issue here is not the memory, but rather how the 6510 addressed it.
The 6510 emulator will need to talke into account the addressing modes, how to derive a valid physical address, and retrieve (or set) that byte of data.
Notes on C64 Drives:
http://en.wikipedia.org/wiki/Commodore_64_peripherals
As soon as I can, I'll find the protocall specs and post them... the overall scheam is like SPI... somewhat, but different..
ANd here's an example of using a C64 printer...
http://www.textfiles.com/computers/c64topc.txt
(Which, you can see, how to hookup the drive... the c64 drives are smart, ie they have the OS on board.., and how the protocall works!)
Lastly, here's a link to the pin outs of the c64 serial port...
http://www.technick.net/public/code/cp_dpage.php?aiocp_dp=pinconser_c64_c16_c116_p4
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
How about this idea: We'll write a SPIN object to read/write to the USB interface that hooks up to the computer.· Someone could write a program that runs on the computer·to communicate via the USB port, providing virtually unlimited memory access.· This would allow anyone with a dev. board to run this without any extra hardware. (Any takers to write the PC driver and SPIN code [noparse][[/noparse]I have no USB experience]?).· It could also serve as a temporary way to load Commodore programs/disks from the computer's hard drive.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
Thanks - this is getting interesting - I'd love to be able to play some of the old games on a Propeller C64! (especially if I've worked on some of the code!!)
KK - Look forward to reading the posted specs!
James
How about one using the USB2SER module and using 115k serial? I could do that in VB6 fairly easily.
A simple object requesting a block of ram etc would work!
james
My goal is to have a C64 computer (using the Propeller), placing it in an old PC laptop and interfacing it to the VGA LCD screen.· Old laptops are easy to acquire on ebay or at garage sales... the old hardware is ideal because 1) LCD screen, 2) Likely it will have 2 serial ports which can serve as the joystick inputs (DB9 connectors). 3) built-in keyboard.· I'll basically remove the guts and place the propeller circuit board inside, hooking up the wires to the devices I plan to use accordingly.
I already have the 6510 emulator working and it·emulates the addressing·modes - I just need to do the memory reads and writes to something other than the on-board memory.
Yeah, I can't wait - Of course, everyone who contributes code to this will get programming credits in my final version!
-Goog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
http://www.zimmers.net/anonftp/pub/cbm/schematics/computers/c64/manual-html/front_page.html
And this is the programmers Ref for the C64..
http://www.devili.iki.fi/Computers/Commodore/C64/Programmers_Reference/page_i.html
(See chapter 6 for the serial communications stuff)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
Post Edited (Kaos Kidd) : 6/15/2006 7:22:33 PM GMT
If you want to write this, be my guest! I have no USB programming experience and I'd rather not learn [noparse];)[/noparse]· The SPIN code would basically communicate over the USB port using the same methods outlined in a previous post of mine.· I will handle the emulation of it from the C64 bus.
The VB program would handle the communication to the Propeller Dev. board.· It could also load .D64 images (I have some code in VB to do this already)! This would be sweet!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
Im writing the app now. The app will provide 128k of RAM, which the Propeller will use the fullduplexserial and a "expandedRAM" object to deal with this nicely.
so something like:
xx = largeRAM.readByte(yyy)
or
largeRAM.writeByte(xxx)
OK?
James
Good work!
Will you make the expandedRAM object be self-sufficient so that I only have to create that object in my Bus object to do the reads/writes?
Also, make the VB program generic so other Propeller programmers could use it as an expanded ram without having to do anything other than run it (with some configuration settings on the form).· After that is done, I'll combine it with my code to read the .d64 files.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
James
Well it didn't take very long - this is version 1.0 however and it could be improved.· It currently only will read and write a byte (0-255) to the object - however it'd be easy to extend to allow for longs (32 bits)
The PC app runs a 128000 array so should be enough.
Attached is the PC program - you'll need to download the VB6 runtime from http://www.microsoft.com/downloads/details.aspx?FamilyId=7B9BA261-7A9C-43E7-9117-F673077FFB3C&displaylang=en·- probably too big to post here.
Attached also is a propeller demo which implements the object and demo's a 255 byte read/write sequence outputted to LCD
To wire it up - connect pins tx/rx to either the USB2SER or via a line driver (MAX232 etc) to a PC - set the VB app to run on the correct port and walla.
Let me know how you get on!
James
Post Edited (Javalin) : 6/16/2006 11:03:40 AM GMT