Jump to content
IGNORED

5200 in FPGA?


foft

Recommended Posts

Support for the 5200daptor is now in the latest firmware. This maps the additional controller buttons to keyboard events. As a result the core will equally well work with a simple analog gamepad + keyboard and the cx52 connected via a 5200daptor. This will be just plug 'n play.

 

The 2600daptor is also supported by the mist now. But so far only the basic digital joystick has been tested as i still need to find a cheap pair of paddles on ebay.

  • Like 3
Link to comment
Share on other sites

There are two halves to 5200 daptor support. Core and mist firmware. The firmware is done but I need to update the core. Its 90% done but needs debugging. Expect this early next week:)

 

As well as 5200daptor it will also work with USB joystick + keyboard. This will be slightly less 'authentic' though.

  • Like 2
Link to comment
Share on other sites

I wired up my 5200 controller over the weekend to the de1. Keypad, joystick and buttons are working well.

 

Now doing some adjustments to the menu to load 16k 1/2 chip and 32k rom images. Then I'll be ready to release de1 version. For other cartridge types I'm hoping we can use/modify the support that Hias is building for the Atari xl core.

 

It's also running on the mist. On that there will be the option of analog stick+ keyboard or a USB 5200 controller adaptor probably.

 

Curious... With a real 5200 on Pete's test what are the min/max values for horiz/vert? I'm using 5v for pot common and 66uF capacitance right now - a bit off to the left on the box test. Oh and 1.7k ohm for when/if the stick potentiometer has 0 resistance.

 

Main reason I ask. I tried missile command - crazy fast movements! Is this playable on a real 5200?

 

One other question: Most cartridge images are in .bin format, not .car format. Is there a list of which are 1 chip/2 chip etc?

 

Cartridge images should all be "raw" .bin (or .a52) 8K, 16K or 32K (except Bounty Bob). 8K and 16K carts are mirrored in the 5200 "rom space" (ie: loading a 16K cart will mirror it at 0x4000 and 0x8000). There may be a few exceptions.

 

From the game code's perspective (value read from POKEY register), it usually expects joystick X/Y values to be in the following range:

// Note: VSS uses 15/120/220 for LEFT/CENTRE/RIGHT
#define POT_CENTRE 115
#define POT_LEFT 15
#define POT_RIGHT 210
Exceptions are Missile Command and Pengo. I was not aware of the CONSOL bit 2 setting for Missile Command.
Pengo seems to need POKEY joystick values in the range 70 to 170.
Link to comment
Share on other sites

Mist build with 5200daptor support is up.

 

Put 5200.rom under atari800/rom (I'll fix this to 5200 - forgot...)

F12 to get to rom select menu

F10 cold start

In the menu use the 5200 keypad for up down/left/right/fire

 

Can either use the real 5200 via 5200daptor or the keyboard + analog joystick. USB keyboard keypad mapping are:

f1,f2,f3

1,2,3

q,w,e

a,s,d

z,x,c

 

Layout matches the 5200. ie

start,pause,reset

1,2,3

4,5,6

7,8,9

*,0,#

  • Like 3
Link to comment
Share on other sites

 

 

 

Thanks, I thought I might have corrupted my SD card with all the updates and changes I've made lately.

I now understand that this is normal for a 5200 without rom selected. It boots into bios and tries to read the cartridge rom name from the rom which isn't there. It reads garbage and displays that where the rom cartridge name os supposed to be displayed.

 

Once you select a rom everything should be fine.

 

How is this handled on a real 5200? Can this even be switched on without cartridge inserted? What does it then display?

Link to comment
Share on other sites

To quote the Altirra hardware reference manual:

 

Power control

Two cartridge lines are used as a power switching mechanism to cut power to the console whenever a cartridge has been removed. Therefore, the console is never running without a cartridge.

Link to comment
Share on other sites

Yes I should write up a manual. The steps I see are:

Buy mist from Lotharek.

Buy sd card (<=32GB)

Download atari5200core.rbf from my site (www.scrameta.net). VGA version.

Put it on the sd card as core.rbf

Make the following directory structure on the sd card:

atar5200/rom/

atar5200/user/

Put the 5200 os rom in the rom dir named 5200.rom

Put some cartridge images in the user dir

Put in mist!

Turn on!

Plug in USB analog stick and USB keyboard

Press F12 to get menu

Use keyboard (grid on left matching 5200 layout -f1-f3 and below) to select rom

Play game:)

 

Makes an expensive 5200 but its also an Atari XL, Atari 2600, C64, Amiga, ST, MSX, Megadrive etc

 

For now there are some 5200 bugs - eg Star Raiders crashes when I press hash, but this just about the first version. Must be something simple, similar core runs a lot on the XL with the same custom chips.

 

BTW I changed the colour palette to a NTSC one.

  • Like 3
Link to comment
Share on other sites

Fixed Moon Patrol - my pokey keyboard scanner was registering break until the next scan. I now only set this as it reads it.

Fixed Star Raiders - it reads $d300. Legacy code from the Atari 800 to read the joysticks. If it reads 0xff it hangs forever! I changed the bus to pull down to 0x00 instead of up to 0xff. I think it might float in reality - I see $ad in Altirra but have not read hardware to check.

Build soon...

  • Like 2
Link to comment
Share on other sites

@foft thanks for the update. I thought my 5200 controller had a bad key pad. Now it seems to be working as expected with your latest release. :)

 

Update:

I may have spoke too soon. My 5200 joystick key pad either starts out non-responsive or works for a while then becomes unresponsive. The keyboard emulated 5200 keypad always works.

Looks like it's time to clean the controller.

Edited by NML32
Link to comment
Share on other sites

Only tried a couple titles so far - Choplifter and a Space Invaders - but they worked great.

 

I had to rename my roms to .bin since .a52 files weren't visible (I'm using the 141102 build).

 

I'll admit the 5200 is a system I've largely overlooked, since I was under the perhaps incorrect assumption that 5200 titles were going to be the same as their 800 counterparts. I was surprised by how different Space Invaders was.

 

This is a good excuse/opportunity for me to get acquainted with the platform.

Link to comment
Share on other sites

New build will be up tomorrow. It adds .a52 to the cartridge selection filter. It also adds .car support. For .bin/.a52 it asks for clarification on the type for 16k ones. So .car is the way to go:-)

 

Yeah I've never used the original hardware, though there never was a PAL version so that isn't that surprising.

 

Was there much home-brew made?

Link to comment
Share on other sites

Hmm. Just gave this a shot with firmware_141024_r365 and 20141104/mist_5200 and it's not working correctly for some reason.

 

First - it seems that there is a typo in the code? an atari5200/ directory on the SD card produced just garbage on boot up, but using an atar5200/ directory structure at least got me to the 5200 booting.

 

After I got past that I can enter the F12 menu and then it seems it's frozen. USB joystick / keyboard / 5200daptor don't seem to do anything to move the menu.

 

Edit: AHA!

 

Got it working, 20141104.5200 core does indeed seem to have a typo for the directory structure.

 

5200daptor is working, and 2/8/4/6 5 must be used to navigate the core OSD - however the corresponding keys from a USB keyboard don't seem to have the same effect.

 

I just played Gorf with analogue control! :D

Link to comment
Share on other sites

Yes it needs to be atar5200. I started with atari5200 but the file system library I'm using does not support long file names(I hacked it to allow them, but for display only). atari5200 ends up being atari5~1 or something like that. I need to improve error reporting in case of a missing os rom.

 

The menu works using the 5200 keypad. This is mapped to the usb keyboard. The keys are mapped in a grid like on the as cx52. F1-f3,1-3,q-e,a-d,z-c etc. Are you sure none in that block control the menu?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...