Danjovic Posted March 2, 2022 Share Posted March 2, 2022 I am writing a simple controller test ROM and I need to show the status of the CBS Booster Grip state as well. My first approach was to read the INPT0..3 variables with inline assembly: asm lda INPT0 sta tempINPT end if tempINPT{7} then ... and of course configure Stella accordingly No need to say that it does not worked, though the generated assembly coded looked ok to me. 2031 f582 a5 08 lda INPT0 2032 f584 2033 f584 85 d8 sta tempINPT 2034 f586 2035 f586 .L053 ; if tempINPT{7} then score = score + 010000 2036 f586 2037 f586 24 d8 BIT tempINPT 2038 f588 10 09 BPL .skipL053 2039 f58a .condpart10 2040 f58a f8 SED 2041 f58b 18 CLC 2042 f58c a5 93 LDA score 2043 f58e 69 01 ADC #$01 2044 f590 85 93 STA score 2045 f592 d8 CLD 2046 f593 .skipL053 Then I did another test, and used INPT4 on the inline assembly, and I could verify that the code worked (also for INPT5) asm lda INPT4 sta tempINPT end if tempINPT{7} then ... Then my question is: Does anybody have already performed the reading of the BoosterGrip buttons using Batari Basic (during the development) ? If so, is there any special procedure that I have to perform ? Thanks! 1 Quote Link to comment https://forums.atariage.com/topic/332027-how-to-read-boostergrip-buttons/ Share on other sites More sharing options...
+Random Terrain Posted March 2, 2022 Share Posted March 2, 2022 Have you looked at this: https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#2buttons 1 Quote Link to comment https://forums.atariage.com/topic/332027-how-to-read-boostergrip-buttons/#findComment-5014581 Share on other sites More sharing options...
Danjovic Posted March 3, 2022 Author Share Posted March 3, 2022 Thanks Randon Terrain. I have read the thread then changed the section of the standard kernel that discharges the capacitors and now the tester works both on Stella and on Z26. Additionally the code was simplified (changed the asm sections to the simpler INPTx{7} syntax! By the way, I am using the score to register the state of every button input, from joystick 1 and joystick 2. As the Fire buttons are pulled up, the logic level on idle is 1, while the other buttons are kept low being pushed high by the top Boost and the Trigger buttons. Source code and ROM attached. DualJoyTester.bas DualJoyTester.bas.bin 1 Quote Link to comment https://forums.atariage.com/topic/332027-how-to-read-boostergrip-buttons/#findComment-5014626 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.