Jump to content
IGNORED

CARTDUMP


Recommended Posts

So, I was going through my old Atari disks, and came across a 1-sector program named CARTDUMP.  I just manually disassembled it:

 

                  * = 0600
0600   A9 01      LDA #$01    ; select
0602   8D 01 03   STA DUNIT    ; disk 1
0605   A9 57      LDA #$57
0607   8D 02 03   STA DCOMND    ; write/verify command
060A   A9 00      LDA #$00
060C   8D 04 03   STA DBUFLO    ; zeroes
060F   8D 0B 03   STA DAUX2    ;
0612   A9 80      LDA #$80
0614   8D 05 03   STA DBUFHI    ; $80xx (slot B)
0617   A9 01      LDA #$01
0619   8D 0A 03   STA DAUX1    ; sector 1
061C   AD 00 D3   LDA PORTA
061F   C9 FF      CMP #$FF
0621   F0 F9      BEQ $061C    ; wait for insertion
0623   A9 80      LDA #$80
0625   8D FF 06   STA $06FF
0628   20 53 E4   JSR DSKINV    ; write the sectors
062B   EE 0A 03   INC DAUX1
062E   D0 03      BNE $0633
0630   EE 0B 03   INC DAUX2
0633   AD 04 03   LDA DBUFLO
0636   18         CLC
0637   69 80      ADC #$80
0639   8D 04 03   STA DBUFLO
063C   D0 03      BNE $0641
063E   EE 05 03   INC DBUFHI
0641   CE FF 06   DEC $06FF
0644   D0 E2      BNE $0628    ; go till done
0646   4C 46 06   JMP $0646    ; total halt
0649   00         BRK
064A              .END

 

And this was my old-time way of dumping cartridges on my 800.  What I would do is boot up to DOS with the cartridge door open by disabling the interlock switch, load and run this CARTDUMP program, switch to a blank disk, and insert the cartridge in the "B" slot (with the system ON), and this little program immediately writes it out to disk starting at sector 1.

 

Probably NOT a recommended procedure, but that's what I used to do.  It actually did work.  I figured some of the old-timers here might find it amusing.

  • Like 1
  • Thanks 3
Link to comment
Share on other sites

5 minutes ago, Wrathchild said:

Doesn't explain how control (Program Counter) is being transferred to $600?
 

The actual file had a header on it, which I didn't include here.  From DOS, L->Binary Load, M->Run at address, enter 0600.  That's all.

Link to comment
Share on other sites

Actually, there is a loop in there that's supposed to wait for a port 1 joystick to be moved before it starts writing, but in practice it would start as soon as the cartridge was inserted.  I don't know why that happens, it was just a happy accident.  I tested it again just to check.  I guess the PORTA value glitches briefly when a cartridge is inserted into a live machine...  It wasn't intended.

Link to comment
Share on other sites

Yeah, the trigger button code works.  Just tried it.  If I wanted to go "all-out" - and it wouldn't really be very hard to code -  I could make the little program also write out a boot sector, some loading code, and a jump to the cart INIT address, and it would just immediately dump a cart out to a bootable disk.  It would only work for carts that don't try to overwrite themselves, but otherwise should work fine. 

 

I never bothered to go that far with it, and it would be kinda pointless with everything now dumped already, but maybe useful for some people.  I'm just playing around with this stuff anyways, just for fun.

  • Like 1
Link to comment
Share on other sites

9 minutes ago, glurk said:

...it would be kinda pointless with everything now dumped already, but maybe useful for some people.

 

New, undumped carts turn up every year (one currently being discussed on the forums is Cheez-Wiz -- newly discovered Roklan proto cart); and guess what, a lot of the people that have the artifacts post on here asking, "what do I use to dump this cart?".

 

  • Like 2
Link to comment
Share on other sites

Well, the code above works, and I used to use it.  But I don't think it's a good method to insert a cart into a live powered-on system.  It always kinda scared me, but that was what I figured out I could do way back around 1984 or so, LOL.  It also just dumps it straight out onto disk sectors, which is pretty darn easy to do on the Atari...  And it doesn't even TRY to handle bank-switching, etc...

 

And, this has probably been done before, I'd bet.  I just got my old Atari from storage a few weeks ago, and I'm still going through my 40 year old floppy disks just to see what all I have, just for fun.

  • Like 2
Link to comment
Share on other sites

I'm pretty sure some of the commercial dumping tools required hot-plugging the cart being dumped.

 

Jindroush (of cartridge dumping fame) developed a disk-based tool and an SDX-cart-based (piggyback) tool for dumping carts, which I think a lot of people use.

Jindroush Cart Tools.zip

 

There's also the AtariMax USB Cartridge Programmer, which can dump about anything, and is really easy to use (has PC software that goes with it). I used to own one, and they work great.

 

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

I looked at that Jindroush tool (not the SDX ones) and it looks like a much more advanced version of the same idea.  It has a display, selections for 8K, 16K, and XEGS bank switching.  And I think it handles the actual filesystem, and writes out a .rom file.  I don't know exactly how it's used.  Much more ambitious than my simple little approach.  I looked a bit for some documentation on it, and didn't find any.  And for me, too much work to disassemble it all.  I'm sure it works well, though, it looks fully fleshed-out.

 

EDIT TO ADD:  Yeah, that cart extender is almost certainly a better way to go!

 

Edited by glurk
Link to comment
Share on other sites

On 5/7/2021 at 2:32 AM, MrFish said:

Jindroush (of cartridge dumping fame) developed a disk-based tool and an SDX-cart-based (piggyback) tool for dumping carts, which I think a lot of people use.

Jindroush Cart Tools.zip 129.29 kB · 5 downloads

While I have successfully run this tool using a replacement EPROM in my SDX cart to dump a cart to disk, the reciprocal program to actually read the data back off the disk into a usable rom dump file or executable was never released. Here is an excerpt from the readme.txt from

"cartsave.zip" on PIGWA:

http://ftp.pigwa.net/stuff/mirror/jindroush.atari.org/DATA/ACARTS/

Cartridge Dumper 2.06
---------------------
(c) 2001 Jindroush
...
The resulting diskimage must be extracted by hand by person which knows the
format (only me :-)

 

It appears to write a linear chunk of data to the disk so it could be reverse engineered, but the dumper does support manually setting $D0x banking bits, so would require some trial and error. Dumping an 8K cart and snooping with RespeQt I saw it wrote 65 sectors from 17-79.. so possibly a header sector + 64x128=8KB of data.

Link to comment
Share on other sites

PORTA doesn't glitch when a cart is inserted.

 

TRIG3 on XL/XE reflects the cartridge state though a program like this won't work there since there's a watch on the state during VBlank which will lock up or restart the machine if the cart state changes.  To do cart copies there you need to set the CRITIC flag so that Stage 2 VBlank is skipped.

My method generally was to just copy the 16K cart space to RAM then write to disk later.

 

In theory you could do a checksum of part of cartridge memory and use a change to detect insertion though on some machines don't we get some floating values in empty memory?

Link to comment
Share on other sites

 

18 hours ago, Nezgar said:

While I have successfully run this tool using a replacement EPROM in my SDX cart to dump a cart to disk, the reciprocal program to actually read the data back off the disk into a usable rom dump file or executable was never released. Here is an excerpt from the readme.txt from

"cartsave.zip" on PIGWA:

http://ftp.pigwa.net/stuff/mirror/jindroush.atari.org/DATA/ACARTS/


Cartridge Dumper 2.06
---------------------
(c) 2001 Jindroush
...
The resulting diskimage must be extracted by hand by person which knows the
format (only me :-)

 

It appears to write a linear chunk of data to the disk so it could be reverse engineered, but the dumper does support manually setting $D0x banking bits, so would require some trial and error. Dumping an 8K cart and snooping with RespeQt I saw it wrote 65 sectors from 17-79.. so possibly a header sector + 64x128=8KB of data.

 

Somehow it doesn't surprise me. I know this guy had some snide comments on his site about not posting "ROMz" for "Cool Doodz" to download.

 

I never actually used it myself (already had an Atarimax Cart Programmer when I started needing to dump carts).

 

Link to comment
Share on other sites

I've looked (quickly) at the actual Jindroush cartdump disassembly in Omnivore, and it's not really that big.  I'm not volunteering myself, but if someone wanted to properly disassemble and comment the whole thing, it could be figured out.  I won't be doing it, though!  ?

Link to comment
Share on other sites

  • 5 months later...
  • 5 weeks later...
On 5/6/2021 at 5:50 AM, glurk said:

So, I was going through my old Atari disks, and came across a 1-sector program named CARTDUMP.  I just manually disassembled it:

[·snip·]

And this was my old-time way of dumping cartridges on my 800. 

 

Probably NOT a recommended procedure, but that's what I used to do.  It actually did work.  I figured some of the old-timers here might find it amusing.

I used probably a similar cart dumping program on my 800XL. Does it load up and buzz the speaker with a prompt to insert cartridge and press START? I took it to be using a tight loop to keep the system occupied while inserting the cartridge then if it still buzzed after the cart was seated, it worked. Except my version saved a binary load file. I backed up a number of cartridges that way. Hopefully I'll get to checking to see if I still have those floppies. I have a touch tablet and Atari Artist was supposed to be with it. I had a Chalkboard Powerpad with a version of Micro Illustrator for it, too. Sadly I don't have the Powerpad anymore... (Grrrrrrmble..)

Link to comment
Share on other sites

  • 4 weeks later...
On 5/8/2021 at 11:52 PM, MrFish said:

 

 

Somehow it doesn't surprise me. I know this guy had some snide comments on his site about not posting "ROMz" for "Cool Doodz" to download.

 

I never actually used it myself (already had an Atarimax Cart Programmer when I started needing to dump carts).

 

I remember offering and sending him all the cart files I had, when I asked him if he would share any dumps he made he said "I don't share stuff"

  • Sad 1
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...