Jump to content

atari 850 reverse engineering

Joey Z

Recommended Posts

Well, I don't know if anyone has done this before, but I dove in and started decompiling the 850 ROM code. My goal is to understand how the 850 works, inside and out, so that I can accurately emulate it in RespeQt.

One interesting point I have found so far is that the 850 actually runs a RAM test on reset, and if it fails, an error code is sent out the printer port on the data pins of the form:
where R indicates which RIOT failed the RAM test. 0 means A104, 1 means A103. The 850 writes this to the data pins every time there is an error, so if both RIOTs fail the test, the MSB will be 1.

If this test passes, #$FF is written to the data pins of the printer port, at least for a split second. I haven't looked at what happens next.

ROM:F876                 LDY     #0
ROM:F878                 CLC
ROM:F879                 LDA     #0
ROM:F87B                 STA     $280,Y          ; writes 0 to byte of RAM
ROM:F87E                 LDA     $280,Y
ROM:F881                 BEQ     RAMLOCGOOD      ; if it wrote, then branch
ROM:F883                 SEC
ROM:F884                 TYA                     ; otherwise, get ram location number
ROM:F885                 AND     #$80            ; mask lower bits
ROM:F887                 ORA     #$55            ; set lower bits to #$55
ROM:F889                 STA     PPORT_DATA      ; put error code out on parallel port
ROM:F889                                         ; MSB indicates which RIOT has bad RAM:
ROM:F889                                         ; 0 means A104
ROM:F889                                         ; 1 means A103
ROM:F88C                 INY                     ; increment RAM pointer
ROM:F88D                 BNE     RAMTEST         ; if we haven't wrapped around to 0, loop back
ROM:F88D                                         ; if we have, we have tested all RAM, continue.
ROM:F88F                 DEY                     ; always produces #$FF
ROM:F890                 STY     $A1             ; location $A1 is a location in RAM of Z104
ROM:F892                 BCS     RAMBAD
ROM:F894                 STY     PPORT_DATA
ROM:F897                 STY     PPORT_DATADIR   ; set printer port data pins to be outputs

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

Where's the fun in that?

Seriously though, thanks. I had no idea the source had been released.


Curt has uncovered TONS of great stuff like that in the Atari mainframe data tapes he found over the years. Final and near-final source code to tons of devices and software programs, hardware tech documents, etc.

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

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...