Jump to content
IGNORED

Interesting DevOS Cartridge Dumping Issue


vb_master

Recommended Posts

Yesterday I finally got all the parts needed to finish my DevOS cart dumper. After booting up my Windows 98 SE VMWare machine and configuring the VM properly so that my PCI parallel (host LPT2) card was detected as LPT1 in the VM. I ran 7800ctrl.exe with the -tTEST argument to guess the bankswitching type used for a game, let's say Joust (26F8). I dumped the cart a few times, restarting the 7800 each time to assure the reliability of the system. All these dumps of the same game differed with each other and a real known good dump of the game from Good2600 v3.14! None of my dumps worked on Harmony or Stella, whist the real cartridge would work fine. I also tried dumping my Synthcart, it also ended up differing from the AtariAge ROM by only 8 bytes or so. It ran on Harmony (just not Stella).

 

So I decided to try a different game, BMX Airmaster (26F6). Comparing the dump for BMX Airmaster against the Good2600 version resulted in a 100% match. Dumbfounded, I dumped it again to see if it was some kind of anomaly and that second dump was good too.

 

Next, I dumped a larger game that came to mind: Juno First (26F4 I think). First dump would show the title screen in Stella with glitched music and graphics. I made several more dumps, all of the rest not working at all (several k of data in variations from the original semi-working dump)

 

Last, I dumped a 7800 game, Robotron 2084. This dump, after extra bytes were trimmed from the beginning of the ROM at AtariAge, compared exactly.

 

It's bugging me and I cannot figure out what exactly is wrong, it certainly can't be my PCI parallel card, VM of Windows 98, cartridges, or 7800 console (all the real carts work fine).

 

Any ideas on what is causing this? All help would be greatly appreciated!

Edited by vb_master
Link to comment
Share on other sites

How long is the cable? Does it have a shield? Have you checked for continuity between GNDs?

Pin 8 of the DB-9F was connected to pin 25 of the DB-25M. From looking at parallel port pinout, I see there are an additional seven ground points. Should these be bridged with pin 25?

 

The cable is about 1.5m and is unshielded (scavenged from an Atari 7800 controller).

Edited by vb_master
Link to comment
Share on other sites

Bridge all the GNDs on the parallel port end of the cable too.
Just grounded all of them. I tried dumping Joust again three times and it dumped correctly all three attempts! Juno First was yet again different each dump.

 

I don't see why a PCI parallel card would cause so many issues with this, there is plenty of bandwidth available to a PCI slot for this application.

 

Should I try shortening the length of the cable or switching to a shielded cable?

Link to comment
Share on other sites

I don't see why a PCI parallel card would cause so many issues with this, there is plenty of bandwidth available to a PCI slot for this application.

 

Unfortunately its not a matter of available bandwidth. The application handling the communication to the 7800 running on the PC is writing/reading to/from registers in hardware that don't exist on the motherboard (LPT1 - 0x378). These accesses are trapped by the OS and re-vectored to/from the PCI card. This all takes time and is non-deterministic in windows and virtual machines.

 

A real LPT1 port on the motherboard (or a plug in ISA card) is your best bet.

Link to comment
Share on other sites

Here use my FAT32\NTFS bootdisk and try again and see what happens:

The version of 7800ctrl included with this is newer than the one posted on Eckhard's page. Using command line option -a creates more accurate dumps of Synthcart.
This all takes time and is non-deterministic in windows and virtual machines.
I'm amazed that a few milliseconds difference can throw something so much off. I'm considering rewriting 7800ctrl from Eckhard's source by using the API provided by SST DLPortIO instead of inportb/outportb as well as the 16 bit in instruction. That API is used quite successfully in the Xbox 360 JTAG reflashing software. That would be much more elegant than having to reboot my machine into DOS every time I wanted to play or dump a game. Edited by vb_master
Link to comment
Share on other sites

I'm amazed that a few milliseconds difference can throw something so much off.

 

A few milliseconds can be a lifetime in some embedded systems.

 

I'm considering rewriting 7800ctrl from Eckhard's source by using the API provided by SST DLPortIO instead of inportb/outportb as well as the 16 bit in instruction. That API is used quite successfully in the Xbox 360 JTAG reflashing software. That would be much more elegant than having to reboot my machine into DOS every time I wanted to play or dump a game.

 

Eckhard was working on using the 7800 joystick port as a serial interface. Doing that would allow USB to serial communication so modern PCs could easily be supported. I don't know how far he got with the changes.

 

Depending on the software changes you make on the PC side you may also need to modify the DevOS itself (or get Eckhard to make the changes for you).

Link to comment
Share on other sites

Eckhard was working on using the 7800 joystick port as a serial interface. Doing that would allow USB to serial communication so modern PCs could easily be supported. I don't know how far he got with the changes.

 

Depending on the software changes you make on the PC side you may also need to modify the DevOS itself (or get Eckhard to make the changes for you).

A serial-based system would really be the ultimate solution. In the meantime, I'm also working (on and off, mostly off lately) on a 7800CTRL replacement; mine will be Java-based, using the RXTX I/O libraries for Windows/Linux.

 

I haven't had any luck using 7800CTRL with PCI parallel cards, either. I have a DOS machine on which I use an offboard ISA parallel card with 7800CTRL, and that works well, but your only real solution on more modern systems is to use the integrated parallel port (if you have one).

Link to comment
Share on other sites

I'm confused why an ISA card wouldn't have the exact same issues as a PCI card.

 

Onboard parallel ports aren't connected through PCI? They have their own dedicated connection to the chipset? If so, I'm amazed that hasn't changed by now.

 

I've been planning somewhat on getting a new motherboard, and had thought I'd just buy PCI cards for serial/parallel. This may change my mind on that, if an onboard parallel port is actually any better than a good PCI card.

Link to comment
Share on other sites

I'm confused why an ISA card wouldn't have the exact same issues as a PCI card.

 

If the motherboard doesn't have a parallel port but does have an ISA slot the parallel ISA card will appear in the X86's I/O space (as accessed by the in/out assembly language instructions). Its base address of 0x278/0x378 should be configured by jumpers on the card.

 

Onboard parallel ports aren't connected through PCI? They have their own dedicated connection to the chipset? If so, I'm amazed that hasn't changed by now.

 

Blame legacy hardware support :lol:.

 

I've been planning somewhat on getting a new motherboard, and had thought I'd just buy PCI cards for serial/parallel. This may change my mind on that, if an onboard parallel port is actually any better than a good PCI card.

 

If you want to run legacy peripherals (e.g. a serial mouse, old EEPROM programmers etc.) you can't beat keeping an old machine around to do those tasks so that you don't run into any issues. However, if you only have USB peripherals or relatively modern devices (that run on XP with genuine device drivers and not something like giveio.sys) I think that you'll be OK.

Link to comment
Share on other sites

I'm confused why an ISA card wouldn't have the exact same issues as a PCI card.

 

Onboard parallel ports aren't connected through PCI? They have their own dedicated connection to the chipset? If so, I'm amazed that hasn't changed by now.

 

I've been planning somewhat on getting a new motherboard, and had thought I'd just buy PCI cards for serial/parallel. This may change my mind on that, if an onboard parallel port is actually any better than a good PCI card.

ISA cards (at least jumper-configurable ones, as GroovyBee points out) are true hardware-based parallel ports, whereas PCI cards require drivers and legacy hardware support in the OS to be visible to the software as parallel ports. That's one reason I still keep a crusty old DOS machine around: sometimes you just need it, especially if you work with a lot of old weird hardware. I think the PCI cards themselves are fine; the issue seems to be that legacy hardware emulation isn't close enough to be compatible with the way 7800CTRL is designed to drive the port. Perhaps a new program that uses a more modern way of communicating with the hardware (such as through RXTX in Java) will remedy this.

 

And modern motherboards do still include an ISA bus internally, even though they haven't had ISA card slots in a while. Open "Device Manager" in Windows and look around under "System Devices"; chances are likely you'll see a "PCI Standard ISA Bridge" buried under there somewhere. I think the SuperIO chips that are (or were?) used on most motherboards--which integrate serial, parallel, the PS/2 keyboard/mouse ports, and the floppy controller--still sit on the ISA bus. That's why certain things work better with the onboard ports than with legacy ports interfaced through PCI or USB.

Link to comment
Share on other sites

According to Gigabyte, my GA-EP45-UD3P has a parallel port header on the motherboard, but no parallel bracket was provided. Apparently it's product number is 12CF1-1LP001-01R. I have no idea where I would find it though, unless I would have to buy it directly from Gigabyte.

Edited by vb_master
Link to comment
Share on other sites

According to Gigabyte, my GA-EP45-UD3P has a parallel port header on the motherboard, but no parallel bracket was provided.

 

It should be a standard IDC header. Having said that check it against some other manufacturers motherboard manuals. If they all match just find one on eBay.

Link to comment
Share on other sites

It should be a standard IDC header. Having said that check it against some other manufacturers motherboard manuals. If they all match just find one on eBay.

They provided a pinout

01_port.jpg

Also, I found a supplier that has one with parallel as well as a serial port, which my motherboard has a header for as well.

http://www.directron.com/cbl-combo.html

Link to comment
Share on other sites

According to Gigabyte, my GA-EP45-UD3P has a parallel port header on the motherboard, but no parallel bracket was provided. Apparently it's product number is 12CF1-1LP001-01R.

Yeah, I've noticed a few newer motherboards that only give you a pin header; they probably saved a whole thirty-five cents by leaving out the external DB25 connector. What I would do next is install the parallel bracket and try using the onboard parallel port under pure DOS (remember to enable the port in the BIOS as LPT1 if it isn't enabled already). All the parallel brackets I've ever seen are wired exactly the same, so you can probably use anybody's bracket if Gigabyte's is too expensive.

 

EDIT: Damn, I just looked at the pinout you posted and noticed that it's slightly different. Standard parallel cables have the key at the unused pin 26 (somebody correct me if I'm wrong); yours has it at 24. Looks like Gigabyte is going to make you buy their stupid proprietary cable.

Link to comment
Share on other sites

I found someone on eBay selling brackets for the GA-MA790FXT-UD5P, which uses the same part number parallel bracket.

If the part number is the same, then it should work. But since we're dealing with nonstandard cables, you might want to ask the seller to make sure.

Link to comment
Share on other sites

Just thought I'd add that for sending data from console to PC through serial ports, you can usually do so just by connecting two wires (GND and one of the outputs.) Of course in theory this shouldn't work (and many said it wouldn't) because the joystick port outputs TTL level signals and the serial port expects RS232 signals. However, in practice it seems to work just fine. 5v is in spec as a space (+3v to +25v), and although 0v is out of spec for either, most serial ports read it as a mark (normally -3v to -25v).

 

Here is the pinout (2600/7800 right port)

2600 Pin		PC pin (9 pin serial)
----------------------------------------------------
Pin 8 (gnd)		Pin 5 (gnd)
Pin 1 (up)		Pin 2 (RxD)

 

I wrote a 2600 serial driver for 1200-115200 bps using either the above method or assuming one uses a TTL to RS232 level converter (which just inverts the output.) The code is available in the Stella archives here: http://atari2600.org/pipermail/stella/2005-August/018812.html. Looks like the zip is renamed to a bin, but it should work. It could also work for a 7800 but the timings would need to be tweaked due to the higher clock speed. Shouldn't be hard to do.

 

The code above would later become the basis for my FB2 dumper. You can grab the utility for converting hex to bin from that thread, along with source.

Edited by batari
Link to comment
Share on other sites

Just thought I'd add that for sending data from console to PC through serial ports, you can usually do so just by connecting two wires (GND and one of the outputs.) Of course in theory this shouldn't work (and many said it wouldn't) because the joystick port outputs TTL level signals and the serial port expects RS232 signals. However, in practice it seems to work just fine. 5v is in spec as a space (+3v to +25v), and although 0v is out of spec for either, most serial ports read it as a mark (normally -3v to -25v).

It's interesting that this works with standard serial ports using TTL signaling. I knew the 6532 could be used for serial communications, since the Atari 850 interface box uses two of them to drive its four serial ports, but I didn't realize they could make a workable serial interface without additional hardware to generate RS232 signals (as I'm sure the 850 uses). That suggests that a serial DevOS replacement could be implemented entirely in software, using something similar to your driver. What kind of (reliable) transfer rate might be possible with this interface?

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