Jump to content

Search the Community

Showing results for tags 'Auto-Detect'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Atari Systems
    • Atari 2600
    • Atari 5200
    • Atari 7800
    • Atari Lynx
    • Atari Jaguar
    • Dedicated Systems
    • Atari 8-Bit Computers
    • Atari ST/TT/Falcon Computers
  • Gaming General
    • Classic Gaming General
    • Classic Computing
    • Modern Gaming
    • Prototypes
    • Arcade and Pinball
    • Emulation
    • Hardware
    • Gaming Publications and Websites
    • International
  • Marketplace
  • Community
  • Game Programming
  • Site
  • Classic Gaming News
  • The Club of Clubs's Discussion
  • I Hate Sauron's Topics
  • 1088 XEL/XLD Owners and Builders's Topics
  • Atari BBS Gurus's Community Chat
  • Atari BBS Gurus's BBS Callers
  • Atari BBS Gurus's BBS SysOps
  • Atari BBS Gurus's Resources
  • Atari Lynx Programmer Club's CC65
  • Atari Lynx Programmer Club's ASM
  • Atari Lynx Programmer Club's Lynx Programming
  • Atari Lynx Programmer Club's Music/Sound
  • Atari Lynx Programmer Club's Graphics
  • The Official AtariAge Shitpost Club's Shitty meme repository
  • The Official AtariAge Shitpost Club's Read this before you enter too deep
  • Tesla's Vehicles
  • Tesla's Solar
  • Tesla's PowerWall
  • Tesla's General
  • Harmony/Melody's General
  • ZeroPage Homebrew's Discussion
  • Furry Club's Chat/RP
  • PSPMinis.com's General PSP Minis Discussion and Questions
  • PSPMinis.com's Reviews
  • Atari Lynx 30th Birthday's 30th Birthday Programming Competition Games
  • 3D Printing Club's Chat
  • Drivers' Club's Members' Vehicles
  • Drivers' Club's Drives & Events
  • Drivers' Club's Wrenching
  • Drivers' Club's Found in the Wild
  • Drivers' Club's General Discussion
  • Dirtarians's General Discussion
  • Dirtarians's Members' Rigs
  • Dirtarians's Trail Runs & Reports
  • Dirtarians's Wrenching

Blogs

There are no results to display.

There are no results to display.

Calendars

  • AtariAge Calendar
  • The Club of Clubs's Events
  • Atari BBS Gurus's Calendar
  • ZeroPage Homebrew's Schedule

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


Facebook


Twitter


Instagram


YouTube


eBay


GitHub


Custom Status


Location


Interests


Currently Playing


Playing Next

Found 1 result

  1. As I am continuing to develop my first game, I ran into an issue that I couldn't find any information on. I would like to have the system detect the controllers on startup. This way, I can support multiple controllers in the game without using the difficulty switches or some other U/I system to select controller types, simply plug-and-play. I first had the idea of using the fire button to get past the splash screen of the game. However, moving the joystick instead could put the game into paddle mode, which wouldn't be good. So instead, I discovered that you can simply dump the capacitors for the paddles, wait long enough (512 scanlines works), and then read INPT0 (and INPT2). And that's it. Here's the code I wrote, which works perfectly. If a paddle is connected to the left I/O port at startup, the screen will be red. Otherwise, the screen is black. CLEAN_START sta WSYNC ; ensure a whole scanline is spent dumping capacitors lda #$80 sta VBLANK ; dump paddle capacitors to ground WaitLoop sta WSYNC stx VBLANK ; (X=0) stop dumping capacitors sta WSYNC ; waste 2 scanlines per iteration dey ; Y starts and ends as 0 bne WaitLoop ; wait 512 scanlines in loop (511 after grounding caps) lda INPT0 ; D7 set if left paddle is connected, clear otherwise bpl Joystick lda #$46 ; set bg color to red to signify a paddle, else black sta COLUBK ; in a game, you would set a bit in RAM, instead Joystick I attached a .bin and the source code. Obviously, try it on a real system if you can, but it works in Stella, as well. paddletest.bin paddletest.asm
×
×
  • Create New...