Jump to content
IGNORED

Potential new hardware


foft

Recommended Posts

Of course you may suggest it:) To be honest though compatibility is too low right now to fix individual game issues. For now I'm working through acid800. After that testing individual titles will be helpful. ie once its useful to test thoroughly if will be high priority.

 

Personally I think that SD support is "a patch" for real atari hw, as in emulators. So it can wait, and we do get SIO support which is enough for "near 100%" compatibility testing. We do have SIO2SD, SIO2PC, SIO2BSD, Aspeqt, etc, etc. There are three cables (well, four) to connect this, either Disk drive/Sio2SD (before max232) or SIO2PC in numerous implementations (after max232).

Link to comment
Share on other sites

Just a quick note to be careful if connecting Atari drives before the max232. The Cyclone 2 output is LVTTL so suitable logic levels. However the input is not 5V tolerant. I'm planning to use level converting bus switches (or similar) when connecting to sio directly and carts etc.

 

For now I've only tested aspeqt (straight serial cable) and the 1050 using an Atarimax serial universal interface - in prosystem mode. Ie both through the max232.

Link to comment
Share on other sites

There is a VERY simple converter that WORKS, whatever one say.

One resistor and one fet-n transistor per signal.

 

http://www.botkin.org/dale/rs232_interface.htm

 

It should work under 3.3V, under 5V works flawlessly. I have put 5V as pull-up sink for out line (ie ttl->rs232) aswell as on input.

 

I would use this for short distances of course, let's say 1-2m.

Link to comment
Share on other sites

A new version (20130813) is on my site.

 

It has the features I mentioned last week. PAL/NTSC switch, scan doubler and now passes 38 acid tests - getting closer... The 'bad ram' on some de1 boards is still outstanding - current theory is a real bad chip. I tested against a real 1050 successfully too. There is also an option to use internal rom/ram - may be worth trying if you are struggling to get it running. Unfortunately only 8k internal ram and no basic rom due to lack of fpga space.

 

Note the switches have changed. See the readme.txt on my site for details.

 

More software is starting to run now - Megablast works:)

  • Like 1
Link to comment
Share on other sites

Hi foft!

 

So, is SD dsk image support among the initial goals? Or is it going to be added later?

As I said, I don't have an Atari disk unit so I can't test anything besides BASIC.

What would be the way to load programs and games without one on the current core? Line-in casette software from the PC?

Link to comment
Share on other sites

Without de1 board modification: Use a straight through serial cable to pc, then load cas cassette images using aspeqt.

 

With de1 board modification: Use straight through serial cable to pc - then load atr disk images or xex files using aspeqt.

 

Note aspeqt needs a 'decent' serial port. If you're using a USB/serial the FTDI chipset is best.

 

SD card support will be done but I'm fixing core hardware bugs first.

 

Some notes on the DE1 board modification:

The Atari communicates with the disk drive via data in/data out and an additional 'command' channel. Since the DE1 only has two channels via the serial port we need to add an extra connection. I've put this on GPIO 0 pin 1 (note count starts at 0). I will probably change this in later versions when I start using GPIO in earnest. Anyway the GPIO 0 pin 1 needs to transmit to the PC, which can receive it on RI/CTS or DSR. The DE1 is outputting LVTTL logic levels and the RS232 port needs RS232 levels. So some conversion is needed. For rs232 logic 0 is +3v to +15v and logic 1 is -3v to -15v. LVTTL outputs 3.3V high and 0V low. I fed it through spare pins on the MAX232 though this requires a board modification. You can of course do something external to avoid modifying the board.

 

edit: Should also mention:aspeqt is an Atari peripheral emulator for the PC. Normally its used with an SIO2PC cable from a real Atari which does Atari-RS232 level conversion, but since we already have an RS232 port we can directly connect.

Edited by foft
  • Like 1
Link to comment
Share on other sites

Hi @foft, hi everybody! I'm very excited being a DE1's owner to read about this implementation! I'm not an atari user but I'm a big fan of retrocomputing and the main reason I bought an Altera DE1 was the ability to become an old 8/16bit systems. I'm grown using a spectrum and an amiga and now I'm learning about others great systems. It's Awesome!!!

 

Btw, I'm running into some problems with this implementation: I'm not able to load .cas files. All is working as expected, also the rx led on the board is blinking but also if the 800xl is waiting with cload, nothing happens...

 

I do not want to modify my de1 to use the sio protocol, I do prefer to use .cas files and eventually convert xex using xex2cas.

 

I used: the experiment_20130813.sof, aspeqt 0.8.8, my pc serial port with a straight cable.

 

Please advice!

 

P.S.1: sometimes the de1 crash during the emulation with a black horizontal bar on top and darker colors. I'll post a picture later.

P.S.2: I noticed that only when loading the .sof after a cold boot (power cycle), the emulator send something via the onboard serial (green led blinking). If you reset (sw3/4) or reload the .sof file, this serial burst doesn't happen...

P.S.3: @foft there is a possibility to release the source code to the public domain?

Link to comment
Share on other sites

Pleased someone is excited about using this:-)

 

If the RXD led is blinking then aspeqt is sending data and you have the correct cable. Did you press enter again to start the load? Most cas images I've found are autoboot ones not basic ones. So they need loading by holding down start+option, then pressing return to start. Note that the ps2 keyboard keys are not properly registered when the de1 is off, so you sometimes need to halt the cpu (switch 1 on), press keys, then start cpu! I'll fix this...

 

Re PS1: Do you get the same with the internal rom?

Re PS2: This serial burst only happens on cold start. When pressing reset the Atari does a warm start since the RAM contents are not reset. The board needs switching off to clear the RAM. I plan to do something about this since I'd like to cold start without turning off.

Re PS3: I expect I will - but not yet.

Link to comment
Share on other sites

This is a picture of the emulator crashed. As you can see the black border is blue but on top and despite is not a good picture, the colors are correct.

 

https://dl.dropboxus...de1-crashed.jpg

This looks like attract mode to me. The Atari enters this after 10 minutes as a screensaver if you do not press keys. Or does it also freeze for you?

Link to comment
Share on other sites

Ok, most of the issues are due to my ignorance about the system.

 

Btw, how do I obtain the combination "start+option"? I tried any combination of F2-F4 with sw0 on also but nothing...

 

About the attract mode, I'm almost sure that the system doesn't wake up pressing a key. I'll try it again: this time waiting also for a long time, it did not happen...

 

Thank you for the responses and the advice! :)

Link to comment
Share on other sites

Btw, how do I obtain the combination "start+option"? I tried any combination of F2-F4 with sw0 on also but nothing...

1) Power off the board

2) switch 0 on

3) Power on the board

4) Program the board with jtag - unless you're using the pof in flash

5) Hold down F2 and F4.

6) With them still held put switch 0 down

7) You will here a tone on the headphones. Now you can release F2 and F4.

8 ) Start tape in aspeqt

9) Press return on Atari

10) In about 10-20 seconds you will hear the tape loading sound

11) In 5-20 minutes play a game! I'm still working on compatibility so some do not work yet...

 

About the attract mode, I'm almost sure that the system doesn't wake up pressing a key. I'll try it again: this time waiting also for a long time, it did not happen...

 

You can enable attract mode sooner with "poke 77,128" in basic. If it crashes then try with the '3 wait state' rom option.

 

I'll have a new version end of next week with much higher compatibility... I'm comparing many details every day with my real Atari on my logic analyzer. Getting closer!

 

I wonder if its possible to do an aspeqt version that can 'guess' the commands - so it can work without the command channel. If so disk emulation could work without board modifications...

 

Mark

Edited by foft
Link to comment
Share on other sites

Hi @foft! Following your directions, I was able to load an autoboot .cas file (see the picture below).

 

I did also a little movie to show how the game was running.

There are a lot of gfx glitches but is interesting to see that when I press sw4 (or sw3) on the de1 for a little the screen is clear.

 

You can see the movie clicking

.

 

About the attract mode, it works!!! Maybe I was only scared by this strange behavior not being aware of these features.

 

About the SIO port: could be possible to connect all the signals also to the gpio port? I tought to use a little arduino compatible board (teensy 2.0) that is 3,3v compatible, and connect it to the gpio port running arduino2sio.

 

foft_a800xl_warhawk_loading.jpg

Edited by roglio
Link to comment
Share on other sites

Hi @foft! Following your directions, I was able to load an autoboot .cas file (see the picture below).

Great:)

 

I did also a little movie to show how the game was running.

There are a lot of gfx glitches but is interesting to see that when I press sw4 (or sw3) on the de1 for a little the screen is clear.

Key3 and key4 are both reset (with subtleties) so that makes sense. I looked at the video - great to have a video but that game really not working at all! Try my new build, I fixed a vertical scrolling issue that causes this behaviour.

 

Maybe I was only scared by this strange behavior not being aware of these features.

Can you run memory test (hold option on boot or type 'bye' in basic) and tell me if its all green too please?

 

About the SIO port: could be possible to connect all the signals also to the gpio port?

I'll do this and post it in the next few days. Good luck, disk loading is MUCH quicker!

  • Like 1
Link to comment
Share on other sites

Try my new build, I fixed a vertical scrolling issue that causes this behavior.

 

Nope, still garbled as before.

 

Can you run memory test (hold option on boot or type 'bye' in basic) and tell me if its all green too please?

 

Yes! All green! :)

 

I'll do this and post it in the next few days. Good luck, disk loading is MUCH quicker!

 

Great!!! Thanks :)

Link to comment
Share on other sites

Nope, still garbled as before.

Good news!

 

It works in PAL mode, but not in NTSC. Turn on switch 8 to select PAL mode.

 

I've confirmed in Altirra that this is a fault in the original game (I don't have original NTSC hardware to check on).

Link to comment
Share on other sites

I put a version out yesterday that breaks out the sio onto gpio pins (in addition to serial port - see the readme for details). I connected the sio2sd with just a voltage divider for data in. Works though high speed stalls for now. Oddly the sio2sd still tries high speed even if I turn it off in the options menu!

 

In addition to the DE1 board I'm developing for...

http://www.terasic.com.tw/cgi-bin/page/archive.pl?No=83

 

...there is an exciting new one released that I will support. It has a huge fast fpga with lots of ram (1GB DDR and 4MB on board) for a great price. May be worth considering if you decide to buy hardware to try this:

http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=816

 

I also bought a cheap board from ebay - 8k le cyclone 2 - just £20 to try it with - that will need video and audio out adding too in addition to the other ports.

 

Still on target for acid 100% by end of August - with a fair wind this week. Then onto breakout board design, fixing issues with specific games, sd support etc.

Edited by foft
  • Like 1
Link to comment
Share on other sites

After replacing the SRAM on my DE1 it's working fine and I'm on track again for doing tests :)

 



I put a version out yesterday that breaks out the sio onto gpio pins (in addition to serial port - see the readme for details). I connected the sio2sd with just a voltage divider for data in. Works though high speed stalls for now. Oddly the sio2sd still tries high speed even if I turn it off in the options menu!

Great news!

 

Regarding the SIO2SD issue there might be several causes for the problem.

 

#1: possible electrical problem. IIRC there were different SIO data-in variants integrated on the SIO2SD:

 

First version used a straight connection to the Atmel, resulting in problems with other devices on the chain (SIO data out has to be open collector, or only pulling high if the device is actually sending data).

 

Solution was to add a diode to the data-in line making it act like an open collector output. This was integrated in later SIO2SD versions. This works because there's a 4k7 pullup on the SIO data lines inside the Atari.

 

Problem of this fix is that rising edges are now slooow, especially on long SIO chains due to the higher capacity. A possible fix was to add a 10k pullup to the SIO2SD, so that total pullup resistance was about 3k.

 

I checked the GPIO data in pin with nothing connected and measured approx. 0V - seems like there's no internal (?) pullup configured. Not sure if this is the cause of the problems (having the diode on data-in without any pullup should result in 0V signal all the time - so this shouldn't work at all). But, anyways, it might be a good idea to either configure the pin with internal pullup or add an external pullup.

 

#2: possible timing problem

 

Earlier versions of the SIO2SD firmware didn't work at highest speeds (divisor <=3 or so) at all, due to the weird pokey timing (sampling too late). The latest SIO2SD firmwares fixed this by stretching the start bit (although with a slightly different approach than I used in my SDrive fix before).

 

So, first check the SIO2SD firmware version and confirm it actually works on a real Atari in high speed.

 

I ran my pokey timing tests (see the POKEY serial and IRQ timing details thread), connecting pins 2 and 4 of JP1 with a jumper, and saw that your pokey implementation doesn't seem to have that weird sampling/timing as original pokey (IIRC we emailed about this before). I haven't checked the exact SIO2SD timing yet, but maybe this could be the cause of the issue.

 

Here are the screenshots running pokeytest.atr and pokeytest2.atr (compare them to the screenshots from the POKEY thread).

post-9299-0-54438300-1377435187_thumb.jpg

post-9299-0-26742000-1377435202_thumb.jpg

 

so long,

 

Hias

Link to comment
Share on other sites

Doh, of course I forgot its open drain. So I 'should' have just been able to just add a pull up to 3.3v then wire direct to the sio2sd.

 

Though as you say the sio2sd has an extra pull up to 5v....

 

Computer data out and command should be the same. ie I should drive it to 0v and add an external pull up (pin high impedance). However nothing else should be driving these lines I believe so I chose to drive them to 3.3v and 0v for now. I will change that once I get into building the io boards...

 

Yes I should add a matching sampling timing I guess. After you had success at divisor 0 I was hoping it would be ok:)

 

New build up shortly - Dropzone, Golfer and Galaxian playable. Oddly Galaxian is missing 'Player One' text though...

Edited by foft
  • Like 2
Link to comment
Share on other sites

I'm starting to think hardware...

 

For the first board I'm planning a break-out board to add Atari interfaces to the DE1 and Sockit. + anything else anyone fancies porting to.

 

Before I design it looking for views on what I should put on in terms of ports.

 

I'm thinking:

Joystick 0: With joystick, pot, light pen and output support.

Joystick 1: Ditto

Joystick 2: Same except input only

Joystick 3: Same again

SIO port

Cartridge socket

XEGS keyboard socket

Start/Select/Option/Reset buttons

PBI edge connector

 

I'll build one for me and, if it goes well, may make <20 more if anyone is interested.

 

So still relying on the FPGA board for:

Video out

Audio out

PS2 or USB keyboard

SRAM

Flash ROM

FPGA with enough LE's

 

ie for simple boards we'll need to add video/audio out as a minimum. + ram/rom if the fpga does not have enough spare room.

 

Quick update on fpga status: Not a whole lot of time this week. Fixed Galaxian text (fifth player bug) and trying out different 6502 cores. Only 3 acid test failures (release version - more in beta!). Main issues now CPU related - Irq/nmi clash and illegal instructions. So almost there, then onto plain old debugging with real software.

 

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...