Project

General

Profile

Actions

Feature #68

closed

Implement stock Atari 800 mode

Added by Farb over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
06/03/2018
Due date:
% Done:

0%

Estimated time:

Description

It would be great to have the option of using NTSC, OS-B and 48K to reflect an unmodified Atari 800. There are also older Electronic Arts titles (Archon, M.U.L.E., One on One) that do protection checks for custom O.S. code and those fail on the Eclaire when it is running OS-B firmware but obviously run just run on a real Atari 800.

Actions #1

Updated by foft over 6 years ago

I agree, not to mention that 4th joystick port's poor fire button. I actually built most of this for the mist a while back.

Actions #2

Updated by Farb over 6 years ago

  • Subject changed from Add 48K memory option to Implement stock Atari 800 mode
Actions #3

Updated by Farb over 6 years ago

  • Description updated (diff)
Actions #4

Updated by Farb over 6 years ago

Updated this issue to encompass further issues with the current OS-B implementation.

Actions #5

Updated by Farb over 6 years ago

  • Description updated (diff)
Actions #6

Updated by foft over 6 years ago

  • Status changed from New to In Progress

Added Atari800 mode.
Ram selection dialog changed to system. Pressing fire toggles 800/xl/xe.
Only 16/32/48/52k supported for now.
When in 800 mode reset not connected, instead it gives an nmi to antic. So you might need to power cycle more often!

Actions #7

Updated by foft over 6 years ago

@Farb - do you know if the protection ever needs the floating data bus? For now I've set 0xc000 to either 0xff in <52K mode or ram in 52K mode.

Actions #8

Updated by Farb over 6 years ago

I know of one game that relies on it -- Coleco's Wargames. Phaeron and I chatted about this a while back because I couldn't get Wargames to run on Altirra in Atari 800 OS/B mode but it ran on my real Atari 800 just fine. Here are some excerpts from that conversation:

The 800 is unique in having split data buses due to the personality board, which I call the "I/O bus" due to the components connected to it. You can float data on this bus separately from the main bus such that it only reflects the last data transferred on that bus. This causes the 800 to report different values when reading from undriven addresses than other computers with unified floating data buses, like the 130XE. It's why the OS memory scan stops at $C000, and WarGames depends on it for its ROM check to work.

I took a crack at hacking the emulator, and the game is definitely relying on the split memory buses. Essentially, it's writing a byte to the $Cxxx area to prime the bus and then reads eight sequential locations, relying on the personality board data bus to hold that value because the code is executing from RAM. Just capturing and holding all writes to that range doesn't work because it causes the OS memory test to think there's RAM there, which ordinarily doesn't happen because the memory sizing code is itself executing from ROM on that bus. Great.

His update to Altirra listed this change specifically:

Removes the non-functional green/blue parameters in the colors dialog and adds support for emulating the floating bus condition on the second I/O memory bus on the Atari 800. This is necessary to run the original version of WarGames on 800 hardware due to a rather nasty hardware check. Thanks to Farb for the test case. Emulating this is rather expensive, so it is opt-in via System > Memory Config > Floating I/O Bus. This also makes PEEK read the correct values in BASIC.

Actions #9

Updated by foft over 6 years ago

OK, that sounds ... fun! It won't be expensive to add support for but I need to think about it.

For now I just want the system to boot at all after my changes:-)

Actions #10

Updated by foft over 6 years ago

Got it booting again after a few small bug fixes.

Some reset issues on the 800... and it fails the XL banking acid test (which I guess should auto-disable).

Well, will fix up on Friday night.

Actions #11

Updated by Farb over 6 years ago

This is great news! I look forward to testing it :-)

Actions #12

Updated by foft over 6 years ago

Squashed several bugs, but struggling with 16k and 32k mode for some reason, not booting.

Actions #13

Updated by foft over 6 years ago

Built as v25 anyway in case anyone wants to play, but definitely more to do on this...

Actions #14

Updated by foft over 6 years ago

Tried the salt xex. If I boot it on 48k, then change ram to 16k/32k it returns the expected results. i.e. ram test passes with 2 or 4 banks and rom test passes.

So not sure what is going on. Perhaps the low ram somehow effects the zpu kicking off the boot, need to set up signaltap to check the 6502 is indeed starting up I guess.

Actions #15

Updated by foft over 6 years ago

Got signal tap on it. Gets part way through booting then hangs at address 000c. This is after memory detection itself, which seems to work fine (0xb0 to 0x0006 in 48k mode, 0x70 to 0x0006 in 32k mode).

Actions #16

Updated by foft over 6 years ago

This is due to a brk being hit when it jumps to the cart to initialize it. Making the bus 0xff when no ram present which I think will work.

Actions #17

Updated by foft over 6 years ago

That worked... Now for that horrible beep on reset.

Actions #18

Updated by Farb over 6 years ago

This is fantastic progress!!

Actions #19

Updated by foft over 6 years ago

Fixed the beep on reset. Will build as v26. Not sure whether floating data bus if worth it. Looks like it wasn't even the same on the 400. What do you think?

Actions #20

Updated by Farb over 6 years ago

I‘d personally would love to see this get as close as possible to a real Atari 800 but obviously I’m not doing all the hard work :–P

Actions #21

Updated by Farb over 6 years ago

FYI, I tested core 26 and put the Eclaire into 48K 400/800 mode using OS/B (what would even happen if I used XL OS with 400/800 mode?). It still has the same problem with the EA disks as stated in the issue description :-(

Actions #22

Updated by foft over 6 years ago

I’d better wire up the atx code so I can try it myself:)

Actions #23

Updated by foft over 6 years ago

Did you load the original OS B or use the one off the jic? I think the one I included on the jic is patched. I should find the original...

Actions #24

Updated by Farb over 6 years ago

The OS ROM I'm using has a CRC of 0e86d61d.

Actions #25

Updated by foft over 6 years ago

I guess it’s checking c000-cfff then?

I’ll try adding a floating data bus...

Actions #26

Updated by Farb over 6 years ago

From Ijor on the protection details:

IIRC it expects to be variable, non constant. The 800 doesn't have pullups on the data bus. So accessing an unoccupied address, as the CXXX in the 800, will return noise. That's why the earlier version of this protection is really 800 only. No kind of XL/XE translator, not even in ROM, would help.

Instead of random noise and depending on the capacitance, it might return the last data driven on the bus. Don't remember the exact coding of the protection that would allow to work or not in this case. Either way, the code reads twice a few memory locations on that range, and verifies that the value is not the same.

Actions #27

Updated by Farb over 6 years ago

From phaeron:

Altirra implements a single floating bus by default for 800 and XE hardware profiles and has an opt-in for 800 dual floating buses (Memory > Enable floating I/O bus). The only game I know of that requires that is Warhawk. Quick way to distinguish is to run a BASIC program that prints PEEK in a loop; it'll mostly print 255 for no floating bus, 213/0 for an XL/XE floating bus, and 212/0 for an 800 floating bus.

Actions #28

Updated by foft over 6 years ago

OK, I built v27. This has a single floating data bus. I also updated the os rom in slot 4 to this one:
10 KB 0x0e86d61d 4177f386a3bac989a981d3fe3388cb6c Atari OS SYSROM_B_NTSC OS-B 1981 NTSC Production ROM, OS from late NTSC Atari 400/800, LINBUG version with incorrect checksums
(see https://www.wudsn.com/productions/atari800/atariromchecker/help/AtariROMChecker.html)

Actions #29

Updated by Farb over 6 years ago

That worked! I tested both variants of Archon, MULE and One on One and they all loaded just fine. Great job! Now I just need to figure out what you mean by OS slots :-P

Actions #30

Updated by foft over 6 years ago

  • Status changed from In Progress to Closed

Great! Going to close this until I decide to add 2 bus support or you find a bug in it:-)

I mean the profiles. There are 4 slots saved to the flash chip. They are by default:
1) 576k compy pal vga with basic c and hias hi-speed patched xl rom
2) 576k compy pal vga with altirra basic and altirra os
3) 576k compy pal vga with basic c and original xl rom
4) 48k 800 pal vga with os b

So press f11, select profile with left/right and press enter. Or press 1/2/3/4 in F11 menu.

Actions

Also available in: Atom PDF