ByteProject / Puny-BuildTools

PunyInform CLI and retro disk image factory for Infocom Z-machine games
Other
57 stars 9 forks source link

Atari ATR disk image issue #6

Closed shift838 closed 1 year ago

shift838 commented 1 year ago

i have found that the Atari ATR disk images that your tool creates will only read if certain firmware is selected. Others will generate a black screen or a 'INTERNAL ERROR #2590' when trying to boot.

The below is the same for any system I try, 400/800/1200/XL/XE/XEGS

Here is a list from Altirra 4.10 AltirraOS 3.34 for 400/800 Works AltirraOS 3.34 for 65C816 'INTERNAL ERROR #2590' AltirraOS 3.34 for XL/XE/XEGS 'INTERNAL ERROR #2590' Atari 1200XL OS rev. 10 'INTERNAL ERROR #2590' Atari 1200XL OS rev. 11 'INTERNAL ERROR #2590' Atari 400/800 OS-A NTSC Black screen, no boot Atari 400/800 OS-A PAL Works Atari 400/800 OS-B NTSC Works Atari 400/800 OS-B NTSC (patched) Works Atari 400/800 OS-B PAL Works Atari XL/XE OS ver.1 'INTERNAL ERROR #2590' Atari XL/XE OS ver.2 'INTERNAL ERROR #2590' Atari XL/XE OS ver.3 'INTERNAL ERROR #2590' Atari XL/XE/XEGS OS ver.4 'INTERNAL ERROR #2590'

not sure what it is, but even the ATR disk explorer software cannot read the disk. I get an error that states 'Unable to detect the file system on the disk image.'

I have attached the disk image.

locked_atari8bit.zip

ByteProject commented 1 year ago

I can explain this. I think you are missing some understanding here how Atari 8-bit machines generally work, what their hardware features are and how Altirra emulates them.

First of all, there is nothing wrong with the disk images. The BuildTools use the original Infocom interpreters. And the way the BuildTools create these disk images results in an accurate representation of how an Infocom disk image looked like. It would be very surprising if the ATR disk explorer shows you something because it fails equally with all the Infocom games.

For Atari 8-bit, the a8bit.sh script is not only a simply shell script but a real program which also supports command line parameters. By default, without parameters, the tool uses the earlier Infocom 8-bit single disk interpreter to bundle your story file and build the disk image. If you use the -2 flag, which would look like this ./a8bit.sh -2 it will use the later Infocom 8-bit two disk interpreter instead to create your disk images. This makes especially sense when you have bigger story files that won't fit on one disk. I actually never tried to build a very small game like the one you provided here. The 2-disk interpreter wants the story file to be prepared in a certain way which splits it at a certain offset. I am almost sure that if the story file is smaller than the actual offset, it will not work. So here is a disclaimer: use the 2-disk interpreter with small story files at your own risk as it likely won't work.

Now to your errors. The early single-disk interpreter, which you used to create the Atari 8-bit disk image of your game, needs to be started from a BASIC prompt. It won't work if you boot it from machine code mode instead, which will result in 'INTERNAL ERROR #2590'. Please make sure that in Altirra under -> SYSTEM you enable this option -> Internal BASIC (boot without option key). When the machine enters BASIC, you type DOS to start the game. That literally resolves all your problems with the XL machines. Disclaimer: I did not test XEGS as that was a cartridge based gaming system. Even the 1200XL works perfectly fine but you probably missed something about this machine which Altirra does not tell you: the 1200XL did not come with a BASIC Rom equipped. Instead, you had to insert a cartridge. So if you go to Altirra's menu and choose ->FILE -> ATTACH SPECIAL CARTRIDE -> BASIC, the game of yours will run just fine on the 1200XL. And that likely is the same problem you had with the 400/800 as these machines needed a BASIC cartridge as well. I tested your game under 400/800 OS-A NTSC ROM (1979) and it runs perfectly fine. Please note that the 1200XL, even though the name may suggest something else, came before the 600XL and 800XL. The 1200XL had many compatibility issues with 400/800 software. Many issues the 1200XL had were fixed with the 600XL and 800XL, including being equipped with a built-in BASIC Rom. Any machine prior to the 600/800XL you had to insert a separate BASIC cartridge, so without said cartridge, your game won't boot.

Side-note: the late, two disk interpreter in fact does support being booted from machine code mode but like I said I am not sure if it works for small games like yours, it likely won't.

I am closing this issue now as there is nothing wrong with the disk images or the a8bit.sh used to create the images.

I would encourage you once more to join the PunyInform Discord server, where things like this can be discussed in the INTERPRETERS channel. That avoids creating open issues here in the BuildTools repository that are no real issues. It makes sense to only place issues here which are confirmed, so I can track them when updating the BuildTools. Here's the link to our Discord: https://discord.gg/kcMff45NfE

Here's your game running on a 400/800 OS-A in NTSC mode.

400A_NTSC

Here is your game running on the 1200 XL (booted with BASIC cart equipped)

1200xl

And here is my game running in the late 2-disk interpreter, booted without BASIC on an Atari 1200XL.

late_interpreter

PS: Please don't use the Altirra ROMs. I can not guarantee compatibility with them and I doubt the Altirra ROMs work as good as the original Atari ROMs. My goal is always that something runs on real hardware and there is no real Atari 8-bit computer out there in the wild with an Altirra ROM.

shift838 commented 1 year ago

thanks for the explanation. I'm new to Atari, only got my first 800XL a couple of months ago.

I have joined the discord and I guess I have to wait to get approved to be able to send messages.

ByteProject commented 1 year ago

I just approved you, should be fine now to send messages :)