Felix

Atari 2600 (2601 Project)

22 posts in this topic

Hey, this it a great one to try and get working on the Papilio Arcade. I have had some success getting it to work on the Papilio. I was able to get it somewhat working with the TV Output Wing that BenL put together. I was only getting greyscale output but I was definitely running a cart.

To really make this work good with the Arcade MegaWing we need to convert the NTSC output to VGA output. It should just be a matter of separating the composite sync signal into a Hsync and Vsync and then doubling the speed of the RGB signals.

I made a first attempt at doing so and have checked it into github under the A2601_VGA branch. What I have checked in is not actually working, but it might be close. I think the timing is not right and I have not had time to debug with the OpenBench Logic Sniffer yet. :)

But I thought I'd get the source code out there if anyone wants to play with it.

Jack.

Share this post


Link to post
Share on other sites

I think we really need to drop RetroMaster a line to let him know that we are trying to port his code to the Papilio Arcade MegaWing.

I'm going to try to contact him through his website. :)

Jack.

Share this post


Link to post
Share on other sites

Ok! I'm happy to announce that I was able to put some time into this last week and was able to get the NTSC to VGA conversion working. The A2601 project is now running on the Papilio Arcade! I tested with Donkey Kong and Keystone Kapers and everything works great. I'll be cleaning up and releasing the code soon. In the meantime here is a video:

http://www.gadgetfactory.net/2012/04/coming-soon-atari-2600-on-the-papilio-arcade/

Jack.

Share this post


Link to post
Share on other sites

very cool :)

looking forward to tryin this one out :)

Share this post


Link to post
Share on other sites

Hey everyone,

I just checked the working version of the A2601 HDL code into github. Sorry no documentation or anything yet, but you just need to use the bin2vhdl.py tool to generate a rom for your game and then replace the contents of cart_rom.vhd with your generated contents and synthesize.

Next step is to figure out how to get multiroms working, possibly from flash.

Jack.

Share this post


Link to post
Share on other sites

Seems in the original project he used the Genesis controller's A + directional buttons for the 2600's switches, and the C + directional buttons for switching ROMs, but I guess that didn't survive the transition.

Share this post


Link to post
Share on other sites

We can use the up and down buttons on the Arcade MegaWing to switch carts, but it has to be added to the HDL.

Share this post


Link to post
Share on other sites

I'm trying to compile this in ISE 14.2 and running into an error. I used the python script to convert a ROM file to VHDL and the contents of that look reasonable. When I try to compile though I get "ERROR:Xst:2587 - Port <a> of instance <ms_cart_rom> has different type in definition <cart_rom>."

 

Any idea what I'm doing wrong? I'm guessing it's something simple and dumb but I haven't figured out what.

Share this post


Link to post
Share on other sites

Try with a different ROM, start with the smallest ROMs first.

 

Jack.

Share this post


Link to post
Share on other sites

I must have been missing a file or had the wrong version or something because I downloaded the files from Papilio-Arcade-master and now it builds fine but I don't get anything on the screen. I'll play around with this some more tonight.

Share this post


Link to post
Share on other sites

If i remember correctly my last changes expect a 16k rom image, the merge_roms script in the scripts directory will generate

a 16k cart_rom even from a 2k rom image. If you're generating the rom vhdl manually from a smaller than 16k cart you will need to manually

tell romgen to use 14 bit wide address bus.

Larger than 2k carts will require you to defined the bankswitching method manually.

A2601NoFlash.vhd lines 231 and 232 select the bankswitching mechanism and enables/disables superchip.

Lines 224-229 contain the supported bankswitch methods.

Kevin Horton compiled a huge list of carts with the bankswitching they use, one copy at:

http://www.classic-games.com/atari2600/bankswitch.html

My apologies for not documenting this better within the source code.

Share this post


Link to post
Share on other sites

while working on the Papilio GameBase database, I noticed that the 2k games need to be duped (ie copy /b filename.bin+filename.bin new_filename.bin)

before being sent to ROMGen.  I am not sure if this is a side effect of something, and some games have slight issues (eg. Combat) but for the most part

it seems to work.

 

i thought i would post this here just in case anyone runs into the same problem.

 

If I think about it I will try a 2k file of 0x00 see if that helps

 

[Edit:

It didn't work [append or prepend] (0x00's - which makes sense since they are 6507 BRK's)

neither did 0xEB's (6507 NOP codes)

]

 

//F

Share this post


Link to post
Share on other sites

I finally had time to play around with this again. Now when I try to use the bin2vhdl script I get an error:

 

Traceback (most recent call last):
  File "C:\Xilinx\Projects\A2601\A2601\util\bin2vhdl.py", line 23, in <module>
    fin = open(sys.argv[1], 'rb')
 

 

I'm not sure what I'm doing wrong this time, it's probably something silly. I'm using ActivePython 2.7.2.5 which I changed to from the standard Python 2.7 when I was playing with the SID chip simulator the other day. I have little experience with Python so troubleshooting is tricky. I did some searching and found a bunch of people getting that error with scripts they were writing but I haven't yet found any good clues as to what is causing it here.

Share this post


Link to post
Share on other sites

The error seems to indicate it's failing to open a file. The filename is contained in sys.argv[1], perhaps insert a line above the open statement printing the filename then ensure that file does in fact exist and the permissions are set accordingly so it is readable by your process.

Share this post


Link to post
Share on other sites

Well apparently I'm an idiot. :)  Turns out you have to specify both the input file and the output file, I did that, along with the full paths for good measure and it spit out a .vhd. That solved, I'll try building the ROM into the A2601 source and see what happens.

Share this post


Link to post
Share on other sites

james1095, any luck with this?

 

i have a bunch of stuff 'working' but am seeing some odd bugs like

no sound in pitfall,

air sea battle is just wonky,

etc

 

i am not sure if its something changed in my v14.4 ISE or a bug in the vhdl.

 

guess i put this on the back burner til it gets figured out.

Share this post


Link to post
Share on other sites

Unfortunately I haven't had time lately to pursue this further but I'll post an update when I do. One of these days I'd still like to reproduce the original A2601 as well since I have one of the exact FPGA chips used by the original author, found it on a dead board from a flatscreen TV. It awaits drawing up a layout for the PCB since I wasn't able to find the original PCB file if it was ever posted. Too many projects, too little time.

Share this post


Link to post
Share on other sites

I remembered an important fact to note after yesterday's chat with Felix - the core currently supports

only NTSC games, PAL/SECAM *may* work but probably have some side effects.

*edit* there's definitely some a cock/timing issue somewhere - keystone kapers has gfx artefacts on screen on the p1 but not on Retromaster's original (assuming the screenshot on his page is taken from the board output)

Share this post


Link to post
Share on other sites

I was thinking of adding a debugger/cart loader to the design - there would be plenty of room for that even on a p1-500.

a z80 + a few kb of rom/ram, 80x40 text gfx buffer (ascii table would leave a few usable attribute bits for colour/highlight)

+ serial usb to interface with a pc (code up/download/edit, register dump/edit)

The cpu could of course be anything, z80 just happens to be about the only chip i can write code for :P

Share this post


Link to post
Share on other sites

I was thinking of adding a debugger/cart loader to the design - there would be plenty of room for that even on a p1-500.

a z80 + a few kb of rom/ram, 80x40 text gfx buffer (ascii table would leave a few usable attribute bits for colour/highlight)

+ serial usb to interface with a pc (code up/download/edit, register dump/edit)

The cpu could of course be anything, z80 just happens to be about the only chip i can write code for :P

 

That would be very cool, what about doing it with the ZPUino?

 

Jack.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now