TooSlowGamer #1 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 Share this post Link to post Share on other sites
+Random Terrain #2 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 Share this post Link to post Share on other sites
TooSlowGamer #3 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 Share this post Link to post Share on other sites
TooSlowGamer #4 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 Share this post Link to post Share on other sites
+RevEng #5 Posted September 1, 2010 It looks like bB requires a "include div_mul.asm" line if you enable bB paddle support. Quote Share this post Link to post Share on other sites
TooSlowGamer #6 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 Share this post Link to post Share on other sites
+RevEng #7 Posted September 1, 2010 Works for me. Did you switch Stella over to using paddle controllers? Quote Share this post Link to post Share on other sites
+Random Terrain #8 Posted September 1, 2010 Have you checked out this program yet: http://www.atariage.com/forums/topic/137231-both-paddles-simulatenously/ Quote Share this post Link to post Share on other sites
TooSlowGamer #9 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 Share this post Link to post Share on other sites
+Random Terrain #10 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 Share this post Link to post Share on other sites
+RevEng #11 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 Share this post Link to post Share on other sites
TooSlowGamer #12 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 Share this post Link to post Share on other sites
Nukey Shay #13 Posted September 1, 2010 Stella knows Kaboom needs paddles because it has a game database. Quote Share this post Link to post Share on other sites
+batari #14 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 Share this post Link to post Share on other sites
TooSlowGamer #15 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 Share this post Link to post Share on other sites