Justin Payne Posted March 23, 2019 Share Posted March 23, 2019 I'm going through the source for Fort Apocalypse and right off the bat I'm in need of some clarification. LDA #%00111110 STA SDMCTL Looking into applying values to SDMCRL, it seems that the value applied doesn't seem to make sense. Mapping the Atari is also throwing me off a bit (rim shot), and by that I mean this bit column. I would expect if you want something set, you just set the bit in that column. Now, I would expect for the first four values you can only have ONE option set. So, if I want a wide playfield then I need to inject the decimal 3 into that address. The default value I see used in lot of the examples uses $22 (00100010). In this case, this seems like this sets it to Standard Playfield & Enable instructions to fetch DMA. Could someone please clarify this better for me? Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 23, 2019 Share Posted March 23, 2019 Your thinking is fine, the first 4 values are covered by a combination of the 2 (lowest) bits. The column 'bit' in the table is a little misguiding as the first two indicate that bit 0 can change but bit 1 will always be 0, and with the next two the bit 0 changes and bit 1 is 1 - so should all be listed as "0,1" really. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted March 23, 2019 Author Share Posted March 23, 2019 (edited) Yeah, I was just reading another section of Mapping The Atari and it wasn't as complex and then the bit column thing all of a sudden made sense....and was a bit redundent. I don't need to be told that if I add 2, that both bit 0 and bit 1 will be set. So, now that I understand, the value set in Fort A would equate to.. Standard Playfield Enable Missile DMA & Enable Player DMA Enable Instruction to Fetch DMA Funny how the brain works, and doesn't, some times. :-) Edited March 23, 2019 by Justin Payne 2 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 23, 2019 Share Posted March 23, 2019 In the larger majority of the time Mapping The Atari uses tables the 'bit' is at the left hand side so its not unsurprising the layout of SDMCTL would throw people out, the same is done with GPRIOR - but then that's a confusing register in it's own right 1 Quote Link to comment Share on other sites More sharing options...
+slx Posted April 2, 2019 Share Posted April 2, 2019 I have found that it is much easier to grasp stuff like this when "thinking hex", as it's much easier to correlate bits to numbers when you have one hex digit per 4 bits. 2 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted April 2, 2019 Share Posted April 2, 2019 yeah, when doing machine language programming, thinking in decimal actually hinders you... -Thom 2 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.