Joey Z Posted July 31, 2015 Share Posted July 31, 2015 (edited) 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:R1010101where 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 VEC_RESET: ROM:F876 LDY #0 ROM:F878 CLC ROM:F879 ROM:F879 RAMTEST: 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 ROM:F88C RAMLOCGOOD: 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 ROM:F897 RAMBAD: ROM:F897 STY PPORT_DATADIR ; set printer port data pins to be outputs Edited July 31, 2015 by Joey Z 2 Quote Link to comment Share on other sites More sharing options...
Joey Z Posted July 31, 2015 Author Share Posted July 31, 2015 I forgot that the printer port data pins are opposite to the RIOT pins, so the output should be inverted. All 0 on success, R0101010 on RIOT RAM failure, where R is 0 for A103 and 1 for A104. Quote Link to comment Share on other sites More sharing options...
phaeron Posted July 31, 2015 Share Posted July 31, 2015 You could decompile the controller firmware... or you could just read the original source code. http://www.atarimuseum.com/computers/8bits/400800/atari850.html 3 Quote Link to comment Share on other sites More sharing options...
Joey Z Posted July 31, 2015 Author Share Posted July 31, 2015 You could decompile the controller firmware... or you could just read the original source code. http://www.atarimuseum.com/computers/8bits/400800/atari850.html Where's the fun in that? Seriously though, thanks. I had no idea the source had been released. 1 Quote Link to comment Share on other sites More sharing options...
+DrVenkman Posted July 31, 2015 Share Posted July 31, 2015 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. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.