Author Topic: Atari2600 Cartridge Reader V2  (Read 17009 times)

0 Members and 1 Guest are viewing this topic.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Atari2600 Cartridge Reader V2
« on: November 11, 2013, 06:14:14 am »
Original post: http://8times8.host56.com/?p=334

I started porting the cartreader software to the eZ8 microcontroller. It is already possible to read cartridges.

Because the eZ8 has 29I/O pins I don't have to use latches to expand the address bus. This means I only need two IC's for the entire build: A max232 for serial communication and the microcontroller! This greatly reduces the cost of the entire thing. It also makes it much easier to build than its arduino counterpart.



The cartreader V2 has a renewed communication protocol. Instead of dividing the cartridge address range in pages you can have random access to the cartridge via the pc and do block transfers. Every block has a header like this:

Code: [Select]
mode = [0x00..0x01] (0x00=read, 0x01=write)
size = [0x00..0xFF] (0x00=1byte, 0xFF=256bytes)
addrH = [0x00..0x0F](12 bit start address)
addrL = [0x00..0xFF]

If write mode was selected [size] bytes will follow. These are buffered and then written to the cartridge starting at the 12 bit start address.

In the next couple of days I will modify the romclient.exe pc software so it works with the eZ8 version. I will rename it to romclient2.exe to avoid confusion.
« Last Edit: November 11, 2013, 06:14:50 am by Keoni29 »
If you like my work: why not give me an internet?








Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Atari2600 Cartridge Reader V2
« Reply #1 on: November 11, 2013, 09:29:25 am »
Wha, that looks pretty awesome, great job! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: Atari2600 Cartridge Reader V2
« Reply #2 on: November 11, 2013, 09:46:48 am »
indeed that pretty interesting. Block transfer is really cool  :D
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Atari2600 Cartridge Reader V2
« Reply #3 on: November 11, 2013, 12:23:02 pm »
Yup, nice job Keoni.
* Streetwalker has no hardware stuff. :/

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Atari2600 Cartridge Reader V2
« Reply #4 on: November 11, 2013, 03:35:56 pm »
I just succesfully modified the romclient.exe to work with the new block transfers. It works even better than before. I tested it with these games so far:
Demon Attack
Yar's Revenge
Video Pinball

The next thing I am going to implement is bankswitching. I am not sure how I want to do this yet though. I might create a simple interpreter for it. Example for an 8KB cartridge with 2 4k banks:
Code: [Select]
000[4k],sw[FF9],000[4k]Result:
Code: [Select]
Read 4Kbytes starting at 0x000
Bankswitch by putting address 0FF9 on the address bus
Read 4Kbytes starting at 0x000
This results in an 8KB file on the computer.
If you like my work: why not give me an internet?








Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Atari2600 Cartridge Reader V2
« Reply #5 on: November 11, 2013, 03:37:32 pm »
Good job again Keoni :).

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Atari2600 Cartridge Reader V2
« Reply #6 on: November 11, 2013, 05:30:59 pm »
Oh also: my code assembles to 218 bytes.
If you like my work: why not give me an internet?








Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Atari2600 Cartridge Reader V2
« Reply #7 on: November 11, 2013, 10:33:33 pm »
Nice. By the way you should make a video of it in action at one point. :D

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Atari2600 Cartridge Reader V2
« Reply #8 on: November 12, 2013, 03:31:50 am »
I just uploaded an old video of the arduino version in action. I want to get one type of bankswitching to work today: F8. I described that method in my previous post. The cool thing about the new block transfer communication is that it allows for bankswitching to be controlled by the pc. No need to change any of the microcontroller's firmware.

I am also going to draw the schematics for the new cartreader.


Edit: I almost got the first bankswitching method to work. There is a little bit of glitching going on though. I might have to add some delay.
Edit2: After I modified the rom dump with a hex editor I got it to work. I fixed the bug that caused the dump file to have a 1 byte offset on every bank. This was because I did not read the byte returned from the bankswitching!

I managed to dump Asteroids which is an atari 8k game that uses F8 bankswitching!


Edit: I do not own any more F8 bankswitching games sadly, but I tested some other games now too:
Slot Racers
Combat
Pac-Man
Outlaw
Chopper Command
Megamania
« Last Edit: November 12, 2013, 09:30:15 am by Keoni29 »
If you like my work: why not give me an internet?








Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Atari2600 Cartridge Reader V2
« Reply #9 on: November 12, 2013, 12:39:11 pm »
« Last Edit: November 12, 2013, 12:39:34 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Atari2600 Cartridge Reader V2
« Reply #10 on: November 12, 2013, 03:49:27 pm »
Wow that's pretty awesome, great job !

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Atari2600 Cartridge Reader V2
« Reply #11 on: November 12, 2013, 04:44:35 pm »
^that, it is looking epic! Great job!

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Atari2600 Cartridge Reader V2
« Reply #12 on: November 12, 2013, 04:53:55 pm »
Working on a better multicartridge as well. This one will support F8 bankswitching! There are three IC's in the cartridge that take care of the bankswitching. The cartridge will also feature a much larger RAM chip than the last one. This one has 128KB ram which can hold up to 16 8k games!
If you like my work: why not give me an internet?








Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Atari2600 Cartridge Reader V2
« Reply #13 on: November 14, 2013, 06:24:46 am »
Allright! I can write to my old 8k multicartridge with the new cartreader now! I had to do some bugfixing. The timeout on the serial port is now higher so there is plenty of time for the cartridge to dump its data.

The firmware on the cartreader is now 316 bytes :P
If you like my work: why not give me an internet?








Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Atari2600 Cartridge Reader V2
« Reply #14 on: November 14, 2013, 08:29:53 am »
Cool stuff Keoni! I can't watch the video atm cause youtube is acting up. I'll check it again later. :)