' ' ======================================================= ' INPUT DEVICE TESTER: FOR DOS, WINDOWS, AND SEGA GENESIS ' ======================================================= ' A HOMEBREW TECH DEMO FOR TESTING INPUT ' ' A program where one can test the keyboard for QBasic/QB64 ' and, test the controller for the Sega Genesis on SecondBASIC ' ' This is Reddit user /u/SupremoZanne's first attempt at ' writing a program which automatically changes it's ' program routine if a different dialect of BASIC is chosen. ' ' This tech demo here was also made so we could have a program ' that runs on QBasic for DOS, QB64 for Windows, Mac OS and Linux ' as well as SecondBASIC for Sega Genesis. ' ' The BASIC programming language has so many dialects, that it's ' time we find ways to automatically detect which type ' is being used as a program gets written. ' DIM ch AS INTEGER DIM x AS INTEGER DIM y AS INTEGER CLS ' IF TIME$ = "" THEN GOSUB notQB ' A special trap to redirect to "Sega Genesis" mode. ' PRINT PRINT " You are using QuickBasic, QBasic or QB64." PRINT PRINT " INKEY$ entry: " PRINT PRINT " PRESS SPACEBAR 5 TIMES IN A ROW TO QUIT" DO k$ = "" WHILE k$ = "" k$ = INKEY$ GOSUB spray WEND k = ASC(RIGHT$(k$, 1)) COLOR 14 LOCATE 4, 16 SELECT CASE k CASE 32 PRINT " " q = q + 1 CASE ELSE PRINT k$; " " q = 0 END SELECT IF q = 5 THEN GOSUB ending LOOP ending: CLS COLOR 7 END spray: x = (RND(1) * 79) + 1 y = (RND(1) * 14) + 8 COLOR RND(1) * 15 ch = (RND(1) * 222) + 32 LOCATE y, x PRINT CHR$(ch); RETURN notQB: PRINT PRINT "You are using SecondBASIC." PRINT PRINT "button pressed: " PRINT DO LOCATE 5, 1 COLOR 0 PRINT " UP" PRINT " LEFT RIGHT |A| |B| |C| | START |" PRINT " DOWN" PRINT PRINT "joypad() value: " WHILE j = 0 GOSUB spray2 j = JoyPad(0) WEND COLOR 2 LOCATE 9, 16 PRINT j; " " LOCATE 5, 5 IF j.0 THEN PRINT "UP" LOCATE 7, 4 IF j.1 THEN PRINT "DOWN" LOCATE 6, 1 IF j.2 THEN PRINT "LEFT" LOCATE 6, 7 IF j.3 THEN PRINT "RIGHT" LOCATE 6, 17 IF j.4 THEN PRINT "|B|" LOCATE 6, 21 IF j.5 THEN PRINT "|C|" LOCATE 6, 13 IF j.6 THEN PRINT "|A|" LOCATE 6, 25 IF j.7 THEN PRINT "| START |" WHILE j = JoyPad(0) GOSUB spray2 WEND LOCATE 9, 16 COLOR 2 PRINT JoyPad(0); " " LOOP spray2: LOCATE 11 + RND(14), RND(40) COLOR RND(4) PRINT CHR$(RND(255)); RETURN
submitted by /u/SupremoZanne
[link] [comments]
More...
I just made a homebrew program for testing a 3-button Sega Genesis controller. This one also runs on QBasic for testing the k
[Released: 1988] The Sega Genesis was Sega's most successful console; though Sega has never released a total sales figure quote. Several add-ons were created including the Sega CD and Sega 32X which extended its capabilities.
Post Reply
1 post
• Page 1 of 1
Post Reply
1 post
• Page 1 of 1
Jump to
- From Retro to Current
- ↳ Classified Ads
- ↳ Community
- ↳ Marketplace
- ↳ Jobs
- ↳ Dating
- ↳ Housing
- Nintendo Forums
- ↳ SNES Classic Edition Forum
- ↳ Switch Forum
- ↳ NES Classic Edition Forum
- ↳ Wii U Forum
- ↳ 3DS Forum
- ↳ Wii Forum
- ↳ DS Forum
- ↳ Gamecube Forum
- ↳ Game Boy Advance Forum
- ↳ Game Boy Color Forum
- ↳ Nintendo 64 Forum
- ↳ Super Nintendo Forum
- ↳ Game Boy Forum
- ↳ Nintendo Entertainment System Forum
- ↳ Game & Watch Forum
- SONY Forums
- ↳ PlayStation 5 Forum
- ↳ PlayStation Classic Forum
- ↳ PlayStation 4 Forum
- ↳ PlayStation Vita Forum
- ↳ PlayStation 3 Forum
- ↳ PlayStation Portable Forum
- ↳ PlayStation 2 Forum
- ↳ PlayStation 1 Forum
- Microsoft Forums
- ↳ Xbox Series Forum
- ↳ Xbox One Forum
- ↳ Xbox 360 Forum
- ↳ Xbox Forum
- SEGA Forums
- ↳ Genesis Mini Forum
- ↳ Dreamcast Forums
- ↳ Sega Saturn Forum
- ↳ Genesis Forum
- ↳ Master System Forum
- Other System Forums
- ↳ General Discussion
- ↳ Other Console Forum
- ↳ Arcade Cabinet Forum
- ↳ Windows, Mac, & Linux Forum
- ↳ Atomiswave Forums
- ↳ WWW.ATOMISWAVE.NET
- ↳ General Discussion
- ↳ Tech Support
- ↳ System Setups
- ↳ Modified Moderboards
- ↳ Home Consoles & Systems
- ↳ Arcade & Candy Cabinets
- ↳ Marketplace
- ↳ Video Game Marketplace
- ↳ Game Discussion
- ↳ Video Game Catalogs
- ↳ FAQs, Reviews, & Guides
- ↳ Assorted Discussion
- ↳ Custom Ideas
- ↳ Open Discussion
- ↳ SNK Neo Geo Forums
- ↳ General Discussion
- ↳ Buying & Selling
- ↳ Tech Support
- ↳ Systems
- ↳ Neo Geo Arcade Stick Pro Forum
- ↳ Neo Geo Mini Forum
- ↳ Neo Geo X Forum
- ↳ Neo Geo CD Forum
- ↳ Neo Geo MVS Forum
- ↳ TurboGrafx-16 Forums
- ↳ General Discussion
- ↳ Marketplace
- ↳ Games
- ↳ TurboChip/HuCard Forum
- ↳ CD-ROM²/Super CD-ROM²/Arcade CD-ROM² Forum
- ↳ Systems
- ↳ TurboGrafx-16 Mini Forum
- ↳ TurboDuo Forum
- ↳ TurboExpress/PC Engine GT/LT Forum
- ↳ SuperGrafx Forum
- ↳ TurboGrafx-CD/PC Engine CD Forum
- ↳ TurboGrafx-16/PC Engine Core Forum
- ↳ Raspberry Pi Forum
- ↳ Atari Forum