Jump to content

Photo

Flashback Portable: Needed Controller Hacks


369 replies to this topic

#351 doctorclu OFFLINE  

doctorclu

    ***Moon Patrol 5200*** *Moon Master2015* *Blue Max:Class 4*

  • Topic Starter
  • 7,643 posts
  • *Star Raiders 2* **Captain -CL 2**
  • Location:*Star Raiders * *Star Commander -CL 1*

Posted Thu Dec 7, 2017 9:41 PM

Always awesome to see the stuff you fix Nukey.



#352 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,779 posts
  • Location:The land of Gorch

Posted Fri Jan 26, 2018 10:49 PM

Arcade Pong (FB2):

For some odd reason, the programmer called an HMOVE 21 cycles into a scanline.  Removing that, the ball reacts properly now.  I also trimmed the program size down from 3k to 2k and corrected the scanline count to 262.

Attached Files



#353 Arenafoot OFFLINE  

Arenafoot

    Stargunner

  • 1,219 posts
  • videogamestores.net
  • Location:Watson, LA

Posted Sat Jan 27, 2018 1:53 AM

Arcade Pong (FB2):

For some odd reason, the programmer called an HMOVE 21 cycles into a scanline.  Removing that, the ball reacts properly now.  I also trimmed the program size down from 3k to 2k and corrected the scanline count to 262.

Love it! Now I can play a one player round of Pong!!! Thanks Nukey!



#354 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,779 posts
  • Location:The land of Gorch

Posted Sat Jan 27, 2018 11:12 PM

Paddle variation was somewhat buggy if you use it on other platforms.  This is fixed in V2.

 

It also bothered me a bit that the ball never actually hits objects and walls, so this is also adjusted.

Game Reset allows you to abort a game in progress.

Attached Files



#355 doctorclu OFFLINE  

doctorclu

    ***Moon Patrol 5200*** *Moon Master2015* *Blue Max:Class 4*

  • Topic Starter
  • 7,643 posts
  • *Star Raiders 2* **Captain -CL 2**
  • Location:*Star Raiders * *Star Commander -CL 1*

Posted Sat Apr 7, 2018 8:30 PM

All contributions updated on the start page.



#356 doctorclu OFFLINE  

doctorclu

    ***Moon Patrol 5200*** *Moon Master2015* *Blue Max:Class 4*

  • Topic Starter
  • 7,643 posts
  • *Star Raiders 2* **Captain -CL 2**
  • Location:*Star Raiders * *Star Commander -CL 1*

Posted Sun Apr 8, 2018 8:07 AM

http://atariage.com/...-8#entry3677232

Yes, that matches behavior in Stella.  Game screens that DO migrate downward have been pretty obvious so far.

 

Directional controller hack to Beat'Em & Eat'Em:

 

Are there any joystick directional controller hack for Philly Flasher?


Edited by doctorclu, Sun Apr 8, 2018 12:35 PM.


#357 Gus Stefanis OFFLINE  

Gus Stefanis

    Combat Commando

  • 2 posts

Posted Sun May 6, 2018 8:09 PM

Can Threshold be fixed for FBP?

 

Games Hacked to work on the Atari Flashback Portable.

 

Star Raiders 2600 - (By Nukey Shay)

Tapper - (By Nukey Shay)

BudTapper - (By Nukey Shay)

Acid Drop - (By Thomas Jentzsch)

Custer (portable)   - (By Nukey Shay)
Enduro (portable)   - (By Nukey Shay)
Jawbreaker (portable)  - (By Nukey Shay)
Lochjaw (portable) - (By Nukey Shay)
Marauder (portable)  - (By Nukey Shay)
Sharkattack (portable) - (By Nukey Shay)
Squeezebox (portable)  - (By Nukey Shay)
Wordsattack (portable)  - (By Nukey Shay)

Man-4K pac 1_3 - (By Debro)

Defender 2 - (By Nukey Shay)

Fix It Felix - (By Cybearg)

Raiders of the Lost Ark - (By Nukey Shay)

Circus (Circus Atari w/ a Joystick) - (By Zellers (Company)

Bloody Human Freeway - (By Nukey Shay)

Freeway - (By Nukey Shay) (first two player game on the AFP!)

Nackgammon (portable) - (By Nukey Shay)

Defender arcade (portable) - (By Nukey Shay)

Asteroids (alternate control) - (By Nukey Shay)

Spyhunter (portable) - (By Nukey Shay)

Star Trek (portable) - (By Nukey Shay)

Beamrider (portable) - (By Nukey Shay)

Beat'em and eat'em (portable) - (By Nukey Shay)

Spy Hunter (Black) - (By Nukey Shay with color mod by KevinMos3)

Spy Hunter (Gray)  - (By Nukey Shay with color mod by KevinMos3)

Berzerk - (opening screen modified for Flashback by KevinMos3 w/Nukey Shay fix)

Berzerk (fixed for Portable) - (By Nukey Shay)

Berzerk 2player (portable) - (By Nukey Shay)

Bumperbash (portable) - (By Nukey Shay)

Towering Inferno (portable) - (By Nukey Shay)

Wizard of Wor (controller order change) - (By Nukey Shay)

Gauntlet (other buttons hack) - (By Nukey Shay)

DarkChambers (Other buttons hack) - (By KevinMos3)

Wizard of Wor 16K [includes CBS version by pushing up on dpad at startup] - (By Nukey Shay)

Yahtzee (portable) - (By Nukey Shay)

DK VCS (portable) - (By Nukey Shay)

WestWorld (portable) - (w/ Berzerk fix by Nukey Shay and graphical hack by KevinMos3)

WestWorld Turbo - (w/ Berzerk fix by Nukey Shay and graphical hack by KevinMos3)

Berzerk Turbo (portable) - (w/ Berzerk fix by Nukey Shay and graphical hack by KevinMos3)

Yahtzee with big dice - (By Nukey Shay)

Shieldshifter (portable) - (By Nukey Shay)

Stripoff (portable) - (By Nukey Shay)

Adventures of Tron - (By Nukey Shay)

Surround (portable) - (By Nukey Shay)

Elevator action (portable) - (By Nukey Shay)

Aardvark (portable) - (By Nanochess)

Tacscan(portable)- (By Nukey Shay) (mostly works)

Cxb8 Millipede (no grey)- (By Cats)

PressureCooker(AFPv1)- (By Nukey Shay)

PressureCooker(AFPv2)- (By Nukey Shay)

PressureCooker(AFPv3)- (By Nukey Shay)

RallyX- (By Nukey Shay)

Commandoraid- (By Nukey Shay)

Commandoraid-Paddle- (By Nukey Shay)

Commandoraid-Joystick- (By Nukey Shay)

Arcade Pong- (By Nukey Shay)

 

Games already made useful on the FBP through controller hacks (and my inspiration for this thread)

* Big Bird's Egg Catch - from kid's controller to joystick. - (By OmegaMatrix)

* Holey Moley - from kid's controller to joystick. - (By OmegaMatrix)

* Cookie Monster Munch - from kid's controller to joystick. (By OmegaMatrix)

* Omega Race joystick hack - (By Thomas Jentzsch)

 

 

(THE ORIGINAL PITCH THAT STARTED THIS MESSAGE THREAD)

-------------------------------------------------------------------------------------------------

attachicon.gifpost-4709-0-45339500-1479338060.jpg

 

Even though the Flashback Portable (with the SD card support) is not out in stores till early next month, some of us have ordered one online and are seeing which games work on the little handheld.

 

As a list of hundreds of games are being tested and the results listed, some games break due to special hardware tricks, but most of the non-working games are from the D-pad design and emulation problems.  But this thread is not about that...yet.  :)

 

This thread is making some adjustments to games to help them work better with an Atari system with only one dpad controller and no other controller options.

 

For those up for a challenge or just showing off, here are some games that could use a slight adjustment to make an awesome game on the Flashback Portable (FBP)

 

1) Wizard of Wor:  reassigning controller 2 to controller 1.  It was wild how they made that game making the first player use the second joystick.   At the moment you have to select a two player game to get this to work so that player two gets the FBP's only controller.   Re-assigning player one to joystick 1 instead of the second joystick will just make this experience better.

 

attachicon.gifAtari 2600 Star Raiders Overlay.jpg

 

2) Star Raiders :  Brought this one up, was sad that there was not a keyboard controller.  Then I played Star Master and was inspired on how they brought up a galactic map with the select switch.

 

On the FBP they give you six buttons.  So you have fire of course, then L and R difficulty (two buttons that I know can use used during gameplay), the TV option switch (not sure if anyone has ever used this switch during gameplay) and the select switch (which we know Star Master used.)

 

If someone is up for a challenge, or walking me through a challenge but I'll admit it would be a bit of walking :P what if we used difficulty L (on) for shield on Difficulty L (off) for shield off [since this was a two position switch.   R Difficult on for Fore View, R Difficulty off for Galactic Map, and then select of the TV select switch for hyperspace?   (The sixth button is the pause button which would probably not help us in this case being more hardware/emulator effect than a in game effect.)



#358 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,779 posts
  • Location:The land of Gorch

Posted Sat May 12, 2018 5:46 PM

Threshold's problem is reading SWCHA from a shadow address instead of the standard $0280:

LF923:

       LDA    $0288             ;4

Fixed that, and put both players on the same controller.  Could use some more work to fix the game reset kludge, tho.

Attached Files



#359 doctorclu OFFLINE  

doctorclu

    ***Moon Patrol 5200*** *Moon Master2015* *Blue Max:Class 4*

  • Topic Starter
  • 7,643 posts
  • *Star Raiders 2* **Captain -CL 2**
  • Location:*Star Raiders * *Star Commander -CL 1*

Posted Sun May 13, 2018 10:06 PM

Got a question for SpiceWare tonight.  I would like to change the definitions of the difficulty switches in a game so that A is B and visa versa.

 

What was written below was the most informative on the difficulty switches as it would work in an assembly decompile...

 

 


All of those switches are read via the same register, SWCHB.
attachicon.gifScreen Shot 2016-11-24 at 9.28.21 AM.png
 
While the programming documentation shows difficulty switch positions as amateur (B) and pro (A), I refer to them as beginner (B) and advanced (A).
 
I didn't use the difficulty switches in Collect, but you'll find that they're typically checked using the BIT instruction because it moves bit 6 into V (overflow flag) and bit 7 into N/S which makes it very easy to check them.  N/S = negative/sign - some documentation uses N for negative, other documentation uses S for sign.  They both mean exactly the same thing, it's just something to be aware of - Stella uses N:
 attachicon.gifScreen Shot 2016-11-24 at 9.24.20 AM.png
 

CheckLeftDifficulty:
    bit SWCHB
    bvs LeftDifficultyA
LeftDifficultyB:
    ; do left difficulty B here
    jmp DoneLeftDifficulty
LeftDifficultyA:
    ; do left difficulty A here
DoneLeftDifficulty:
 
CheckRightDifficulty:
    bit SWCHB
    bmi RightDifficultyA
RightDifficultyB:
    ; do right difficulty B here
    jmp DoneRightDifficulty
RightDifficultyA:
    ; do right difficulty A here
DoneRightDifficulty:

 
The branch can also be done the other way:

CheckLeftDifficulty:
    bit SWCHB
    bvc LeftDifficultyB
LeftDifficultyA:
    ; do left difficulty A here
    jmp DoneLeftDifficulty
LeftDifficultyB:
    ; do left difficulty B here
DoneLeftDifficulty:
 
CheckRightDifficulty:
    bit SWCHB
    bpl RightDifficultyB
RightDifficultyA:
    ; do right difficulty A here
    jmp DoneRightDifficulty
RightDifficultyB:
    ; do right difficulty B here
DoneRightDifficulty:

 
When reviewing the Stella Programmer's Guide you may notice the TIA read registers are also wired up to use bits 6 and 7, which was done so they could easily be tested via the BIT instruction.
attachicon.gifScreen Shot 2016-11-24 at 9.38.42 AM.png

 

Great stuff.  :D

 

So if I read this right this comes down to SWCHB and if it registers as bit 6 or 7.  How could I switch the definitions for 6 and 7 and what exactly is "6" and "7" in the decompiled code?

 

Tonight I did try a few other things to switch the definitions.  I replaced bmi (RightDifficultyA) with bpl (RightDifficultyB) and the reverse.   Also tried replacing bvs (LeftDifficultyA) with bvc (LeftDifficultyB) and visa versa.

 

Another thing I tried was the definition of a "BIT" which seems to be either SWCHB or $80.   Seems to be two conditions.   Possible one or off?   Swapped those two with spectacular fails as well.  :D

 

As always, any help you can give will be appreciated.

Attached Files

  • Attached File  bsg.asm   48.39KB   40 downloads


#360 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,779 posts
  • Location:The land of Gorch

Posted Mon May 14, 2018 5:07 AM

Well, that got a "bit" muddled...didn't it?  :P

 

BIT (used as a program instruction) tests a memory location without affecting the A, X, or Y registers.  The result of this test is plunked down into the status register.  There's only 6 possible branch conditions that can follow...3 if the status register flag was set, and the complementary 3 if the status register flag was not set.

 

The BMI/BPL pair is used for bit7 (the highest bit).  If you are familiar with how the instruction AND #$80 works, it's basically the same principle...checking if the leftmost bit is turned on.  The advantage to using BIT is that it does not alter the value sitting in the A register - it's only flipping the flag in the status register.

 

The BVS/BVC pair is used to check bit6 (the next highest bit).  Bit6 in the status register is actually an overflow flag, but it has an effect like an AND #$40 just fine (again, without corrupting the value of A).

 

The last pair is BEQ/BNE...whether the memory location is zero, or if it holds any non-zero value.  Basically doing a CMP #$00 without the legwork.

 

The value in SWCHB is preset to use the console difficulty switch positions as bit7 and bit6 when you read a value from there (although this function can be overridden via SWBCNT, I won't go into that).

 

Consider the following code:

  LDA SWCHB
  AND #$80
  BEQ LF100

A is given the value of the current console switches.  AND #$80 checks the status of the leftmost bit now sitting in A...which corresponds to the Left difficulty switch in SWCHB.  The following branch to LF100 is taken if that bit was turned OFF (i.e. if AND #$80 resulted in zero)...If left difficulty is B, the branch is taken.

 

That small test can be shortened as:

  LDA SWCHB
  BPL LF100

Notice the change there?  A is still being loaded with the value of SWCHB, but there's no AND instruction altering that value.  It's just directly checking if the leftmost bit was turned off to do the branch.

 

The BIT instruction goes one step further...

  BIT SWCHB
  BPL LF100

Pretty much the same as the one above...except now it's not even altering whatever value you currently have sitting in A.  All in all, a handy shortcut.

 

 

 

SWCHB is also preset to hold the current status of the other 3 console switches.  Game Reset is bit0 (the rightmost bit), Game Select is bit1 (the one just left of that), and color/b&w is bit3.  However, the BIT opcode shortcut can't be used for those switches for reasons which should be obvious if you understand the above.



#361 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,779 posts
  • Location:The land of Gorch

Posted Mon May 14, 2018 6:03 AM

Now, you can forget all that if you are only interested in making an existing game do the opposite when you flip the difficulty switches.  Just look though the code for spots that are reading SWCHB; via LDA, BIT, or whatever; and alter the following branch(es) to be their complement.  BMI would become BPL, BVS would become BVC, BEQ becomes BNE.  The only snags here is if the program is saving the value of SWCHB to a ram location (if which case, you'd have to track the use of that ram location in later areas), or if it was pushing bit states into the carry flag via ASL, LSR, ROR, OR ROL (carry flag status can remain unchanged until something else comes along which affects it).  I noticed in the above assembly:

  LDA SWCHB
  LSR ;(nothing)
  BCS LF0D5
  JMP LF000

 

"Nothing" is an incorrect description of what is happening there.  A is loaded with SWCHB, LSR moves the rightmost bit (Game Reset) into the carry status.  The branch is taken if the switch is NOT currently held. Otherwise, the program does a jump to LF000 to start over from scratch.

 

There's also this mess:

LFB61: LDA T1024T
  BPL LFB66 ;RightDifficultyB
LFB66: STA WSYNC
  LDA T1024T
  BPL LFB66 ;RightDifficultyB

 

T1024T is one of the write-only locations to set the hardware timer, and has nothing to do with difficulty switches.

 



#362 doctorclu OFFLINE  

doctorclu

    ***Moon Patrol 5200*** *Moon Master2015* *Blue Max:Class 4*

  • Topic Starter
  • 7,643 posts
  • *Star Raiders 2* **Captain -CL 2**
  • Location:*Star Raiders * *Star Commander -CL 1*

Posted Mon May 14, 2018 9:06 PM

The value in SWCHB is preset to use the console difficulty switch positions as bit7 and bit6 when you read a value from there (although this function can be overridden via SWBCNT, I won't go into that).

 

....

 

SWCHB is also preset to hold the current status of the other 3 console switches.  Game Reset is bit0 (the rightmost bit), Game Select is bit1 (the one just left of that), and color/b&w is bit3.  However, the BIT opcode shortcut can't be used for those switches for reasons which should be obvious if you understand the above.

 

A very good run through of how SWHB works and still trying to completely wrap my head around it all.

 

For fun I see bits 0,1,3,6, and 7 are assigned for SWCHB.   What were 2, 4, and 5 used for?



#363 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,779 posts
  • Location:The land of Gorch

Posted Tue May 15, 2018 4:03 AM

As I mentioned earlier, I wasn't going to go into SWBCNT (the "data direction register" for SWCHB @ $0283).  But since you're asking:

 

By default, data direction for both A (controller) and B (console) ports are set at zero (i.e. "read-only" for all bits in both registers).  Since those 3 stray bits in SWCHB are not configured for anything used by the hardware, you can store value $34 (%00110100) to SWBCNT and be able to use them in SWCHB for whatever you want.  Similarly...if your program only requires a single joystick, for example, you can reset DDR on portA (SWACNT @ $0281) for 4 additional bits of R/W memory there too.  Not much, but it can help if you are really scraping for memory.

 

EDIT: I should mention that Atarivox/Savekey already relies on portA's DDR to function.  It might be best to leave SWACNT alone, or face an ugly mob if highscores get wiped :D


Edited by Nukey Shay, Tue May 15, 2018 4:20 AM.


#364 iesposta OFFLINE  

iesposta

    River Patroller

  • 3,826 posts
  • Retro-gaming w/my VCS
  • Location:Pennsylvania

Posted Wed May 16, 2018 5:43 PM

As I mentioned earlier, I wasn't going to go into SWBCNT (the "data direction register" for SWCHB @ $0283).  But since you're asking:

 

By default, data direction for both A (controller) and B (console) ports are set at zero (i.e. "read-only" for all bits in both registers).  Since those 3 stray bits in SWCHB are not configured for anything used by the hardware, you can store value $34 (%00110100) to SWBCNT and be able to use them in SWCHB for whatever you want.  Similarly...if your program only requires a single joystick, for example, you can reset DDR on portA (SWACNT @ $0281) for 4 additional bits of R/W memory there too.  Not much, but it can help if you are really scraping for memory.

 

*EDIT: I should mention that Atarivox/Savekey already relies on portA's DDR to function.  It might be best to leave SWACNT alone, or face an ugly mob if highscores get wiped :D

 

*Omegamatrix Trak-Ball add to Millipede uses the 4 bytes of portA. Millipede's console RAM and Sara chip RAM were fully used and it was always said "couldn't be done".

I remember asking but don't remember a reply if any RAM was free due to rewriting code and if the controller port is (or is not) still used as RAM. 



#365 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,779 posts
  • Location:The land of Gorch

Posted Thu May 17, 2018 4:34 AM

Rev.5 doesn't use the 3 leftover bits (not bytes) of SWCHB, so there's at least those.  IIRC, some routines could be altered a little to pick up a few more (new)strays in user Ram.


Edited by Nukey Shay, Thu May 17, 2018 4:44 AM.


#366 Karl G ONLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Thu Aug 9, 2018 6:06 PM

FYI, I've created an AFP version of Space Game, which fixes the title screen and the score, as well as disabling the starfield code.



#367 gmjenkster OFFLINE  

gmjenkster

    Combat Commando

  • 1 posts

Posted Mon Aug 13, 2018 11:24 AM

Hello all,

I've seen that the Imagic Game "Riddle of The Sphinx" is playable, but I thought you needed a second controller to cycle through your items that you find, or am I wrong?

Thanks in advance....

 

gmjenkster



#368 Karl G ONLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Mon Aug 13, 2018 12:01 PM

Hello all,

I've seen that the Imagic Game "Riddle of The Sphinx" is playable, but I thought you needed a second controller to cycle through your items that you find, or am I wrong?

Thanks in advance....

 

gmjenkster

 

That is correct.  Unfortunately, since the color/bw switch and the difficulty switches are used for the game, that only leaves the select button free for remapping.  I'm not sure how it could be worked around offhand.

 

https://gamefaqs.gam...phinx/faqs/8942



#369 Karl G ONLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Thu Aug 30, 2018 12:20 PM

If someone has hacked Cosmic Ark, then I missed it.  In case it's useful, here is a version of Cosmic Ark without the starfield effect (and therefore no weird lines on the AFP).

 

Attached File  CosmicArk(portable).bin   4KB   40 downloads



#370 Arenafoot OFFLINE  

Arenafoot

    Stargunner

  • 1,219 posts
  • videogamestores.net
  • Location:Watson, LA

Posted Thu Aug 30, 2018 2:48 PM

If someone has hacked Cosmic Ark, then I missed it.  In case it's useful, here is a version of Cosmic Ark without the starfield effect (and therefore no weird lines on the AFP).

 

attachicon.gifCosmicArk(portable).bin

awesome hack! Thanks!! (added it to the "List" and possible AFP ROM pack update this Christmas too) 






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users