TooSlowGamer Posted August 31, 2010 Share Posted August 31, 2010 (edited) Could someone point me to Batari Basic sample code/snippets that uses a paddle controller? Also, I'm trying to use the readpaddle kernel option, but when I use type in "currentpaddle" it gets highlighted in yellow (in VbB) like it's not a real command. Edited August 31, 2010 by TooSlowGamer Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 1, 2010 Share Posted September 1, 2010 (edited) Could someone point me to Batari Basic sample code/snippets that uses a paddle controller? Also, I'm trying to use the readpaddle kernel option, but when I use type in "currentpaddle" it gets highlighted in yellow (in VbB) like it's not a real command. VbB still doesn't know all of the valid commands and things. If you are sure it's correct, you can probably ignore any warnings. The bB page has one tiny example so far: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#paddlereading And you can use the advanced search to search bB forum topics for the word paddle to see if there are better examples. Edited September 1, 2010 by Random Terrain Quote Link to comment Share on other sites More sharing options...
TooSlowGamer Posted September 1, 2010 Author Share Posted September 1, 2010 Could someone point me to Batari Basic sample code/snippets that uses a paddle controller? Also, I'm trying to use the readpaddle kernel option, but when I use type in "currentpaddle" it gets highlighted in yellow (in VbB) like it's not a real command. VbB still doesn't know all of valid commands and things. If you are sure it's correct, you can probably ignore any warnings. The bB page has one tiny example so far: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#paddlereading And you can use the advanced search to search bB forum topics for the word paddle to see if there are better examples. Well, it won't compile either. The only problem is I can't compile with VbB, so I always copy and paste it into Crimson Editor to paste it. So, I think, the eroor that comes up is different. It says "Fatal Assembly Error: Source is not Resolvable" "Unresolved Code List: mul8 0000 ???? (R )" Quote Link to comment Share on other sites More sharing options...
TooSlowGamer Posted September 1, 2010 Author Share Posted September 1, 2010 Here's the code I'm trying to compile rem Generated 8/31/2010 7:01:06 PM by Visual bB Version 1.0.0.550 rem ********************************** rem *<filename> * rem *<description> * rem *<author> * rem *<contact info> * rem *<license> * rem ********************************** rem Generated 8/31/2010 7:01:06 PM by Visual bB Version 1.0.0.550 rem ********************************** rem *<filename> * rem *<description> * rem *<author> * rem *<contact info> * rem *<license> * rem ********************************** set kernel_options no_blank_lines readpaddle set tv ntsc playfield: ....XXX........................ ...X...X....................... ...X........................... ....XXX........................ .......X....................... ...X...X....................... ....XXX........................ ............................... ....XXX........................ ...X...X....................... ...X...X....................... ............................... end COLUPF = $3C player0x=50: player0y=50 sprites player0: %01000010 %01111110 %01111110 %01101110 %01111010 %01011110 %01110110 111100 011000 011000 end loop drawscreen currentpaddle = 0 drawscreen player0x = 2 * paddle + 1 : if player0x > 153 then player0x = 153 goto sprites Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 1, 2010 Share Posted September 1, 2010 It looks like bB requires a "include div_mul.asm" line if you enable bB paddle support. Quote Link to comment Share on other sites More sharing options...
TooSlowGamer Posted September 1, 2010 Author Share Posted September 1, 2010 It looks like bB requires a "include div_mul.asm" line if you enable bB paddle support. Thanks, now it will compile, but the paddle function doesn't work. It places the sprite on the very left side of the screen and you can't move. Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 1, 2010 Share Posted September 1, 2010 Works for me. Did you switch Stella over to using paddle controllers? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 1, 2010 Share Posted September 1, 2010 Have you checked out this program yet: http://www.atariage.com/forums/topic/137231-both-paddles-simulatenously/ Quote Link to comment Share on other sites More sharing options...
TooSlowGamer Posted September 1, 2010 Author Share Posted September 1, 2010 Kaboom works fine in Stella, but I can't get my game to work or the game you linked. What the heck!? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 1, 2010 Share Posted September 1, 2010 Kaboom works fine in Stella, but I can't get my game to work or the game you linked. What the heck!? Did you do this: Tab key > Game Properties > Controller tab > paddles > close Stella > run game again. Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 1, 2010 Share Posted September 1, 2010 Kaboom works fine in Stella, but I can't get my game to work or the game you linked. What the heck!? Stella knows Kaboom needs paddles because it has a game database. Do what RT said and your program will work. Quote Link to comment Share on other sites More sharing options...
TooSlowGamer Posted September 1, 2010 Author Share Posted September 1, 2010 Kaboom works fine in Stella, but I can't get my game to work or the game you linked. What the heck!? Did you do this: Tab key > Game Properties > Controller tab > paddles > close Stella > run game again. Thanks a lot, it worked. But I'm still confused why Kaboom worked without this? I mean, there's no way the mouse could be set to joystick controls? Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted September 1, 2010 Share Posted September 1, 2010 Stella knows Kaboom needs paddles because it has a game database. Quote Link to comment Share on other sites More sharing options...
+batari Posted September 1, 2010 Share Posted September 1, 2010 It looks like bB requires a "include div_mul.asm" line if you enable bB paddle support. The module is needed for the 2 * paddle + 1 above. If it were written as paddle * 2 + 1 it probably would not be needed. Looks like I should have the compiler check swapped multiplicands and choose the one that produces better code. Quote Link to comment Share on other sites More sharing options...
TooSlowGamer Posted September 1, 2010 Author Share Posted September 1, 2010 Stella knows Kaboom needs paddles because it has a game database. I was typing my response at the same time he was typing his, he just posted before me... 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.