Jump to content
IGNORED

Scorch - full game for Atari 800 and up


pirx

Recommended Posts

1 hour ago, Pecus said:

In this standard, a pressed button acts as an unplugged one, which means it is impossible to write a universal procedure that will work with both types of Joysticks.

We need to write routines for detecting the type of joystick (and remember, we have support for four ports in Scorch!) in each port, or add an option in the menu to select type.

The decision to make pot-pin buttons work like this wasn't invented for Joy2B+, so changing it would break old games, but it's not quite as bad as you make it out to be. This code is universal:

 

PADDL0  = $270
pot_max = $e4

test_button_c
	lda PADDL0
	cmp prev_button_c
	beq not_pressed
	sta prev_button_c
	eor #pot_max
	bne not_pressed
	; code to handle button press goes here!
	...
not_pressed
	; button wasn't pressed, go do something else

prev_button_c
	.byte pot_max

 

(My code calls it "Button C" because that's what it's called on a Megadrive/Genesis controller). You can detect a Joy2B+ or compatible button by checking if prev_button_c ever gets set to anything other than #$e4, and you can read the third button from PADDL1 in the same way.

 

Edit: the code works with a normal joystick because the button is "held down" on startup, and won't be detected until it's "released".

  • Like 2
Link to comment
Share on other sites

1 hour ago, Eyvind Bernhardsen said:

The decision to make pot-pin buttons work like this wasn't invented for Joy2B+, so changing it would break old games,

Old games for Atari use this standard?
Which ones? One title please :)

 

Your code looks O.K but in our case it requires memorizing 4 button values and is longer than mine
I need to see if I can fit it in the memory and if it will work :)

4 new variables - it will not be easy :)

Edited by Pecus
Corrections
Link to comment
Share on other sites

I'd help, but despite my honest attempts I am unable to set-up altirra for Joy2B:

 

In Altirra 3.X I saw buttons 2 and 3, both were pressed, but I couldn't repeat this. Tried Altirra 3.x and 4.10 under Linux and Windows (had to turn on old Windows 10 machine and wait for it to start after apparent update). no bueno :(

I followed the video from this thread like 8 times at least :(

 

Any hints?  

image.thumb.png.b69369c34dc88c9171068b2cde22e90d.png

Link to comment
Share on other sites

I have a reasonable proposal - the changes by @Pecus are very nicely separated here: https://github.com/pkali/scorch_src/commit/a7596995235dc319395dd1371d4f4d1b4e6978e6

As you can see, it is not a huge deal to work on this, except for the fact that adding even few more bytes would break the  5200 version. I think we have a bit more space in Atari 800 version (not huge amount though).

 

So my proposal is as follows - please clone the source and create  Joy2B+ version. If it is possible to merge (the change does not break 5200 and C64 versions), please drop us a PR and we'll merge so it will be official. We would not like to support another binary version (a special xex for joy2b), so merge would require some detection or universal code. 

But even if there is no merge, players would have a separate joy2b+ binary for their enjoyment which we support wholeheartedly, we'll link to the forked binary. 

assembling the code is easy, just grab a fresh mads and call `mads scorch.asm -o:scorch.xex -d:TARGET=800`.

If in the process you find a clean way to save few bytes, we couldn't be more happy. Please note we have many ideas but as these would make the code much less readable, we had to pass on these (we want to do a #Fujinet version and it will require understanding what it is all about!!!!)

  • Like 5
Link to comment
Share on other sites

2 hours ago, Pecus said:

Old games for Atari use this standard?
Which ones? One title please :)

Not sure if any Atari games used extra buttons back in the day, but the SEGA consoles and the Amiga had the same convention of buttons being active low. Turrican is one title ;) Extra buttons on the C64 worked the way you suggest, though.

 

Nowadays a bunch of Atari games have been patched for Joy2B+, of course.

Link to comment
Share on other sites

9 minutes ago, Eyvind Bernhardsen said:

Nowadays a bunch of Atari games have been patched for Joy2B+, of course.

i personally have a problem with ones that fail with a standard joystick, like boulderdash... but i understand the compromise and support the update. we'll also help if you need a hint on how things work in our (also very compromise ridden) code.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

5 minutes ago, pirx said:

i personally have a problem with ones that fail with a standard joystick, like boulderdash... but i understand the compromise and support the update. we'll also help if you need a hint on how things work in our (also very compromise ridden) code.


Yeah, I’ve tried to support standard joysticks in the games I’ve patched for Joy2B, when there’s room.

 

Will see what I can do with Scorch. Would this change even be relevant for the 5200 since its controller is completely different?

Link to comment
Share on other sites

5 minutes ago, Eyvind Bernhardsen said:

Will see what I can do with Scorch. Would this change even be relevant for the 5200 since its controller is completely different?

Fantastic!

Just please keep the code inside `.IF TARGET = 800` blocks and we'll be golden. Also please remember the game supports 4 controllers in Atari 800 and it does work 😮
It would be sub-optimal to have a version that works with 4 Joy2b+ controllers only, so there is this conundrum of supporting both at the same time.

Edited by pirx
Link to comment
Share on other sites

@Pecus:

Define old...?!? Is older than 2000 old enough ? Or do we only count A8 games from the 70s and 80s as old enough ?

 

There are Gemdrop by Bill Kendrick from approx. 1997 and Tetricize (sp?) by TheRealBountyBob from approx. 1993 that both support Sega Genesis / Mega Drive controllers with two buttons. Afaik, Joy2B+ is compatible to that.

 

Link to comment
Share on other sites

3 hours ago, pirx said:

I'd help, but despite my honest attempts I am unable to set-up altirra for Joy2B:

 

In Altirra 3.X I saw buttons 2 and 3, both were pressed, but I couldn't repeat this. Tried Altirra 3.x and 4.10 under Linux and Windows (had to turn on old Windows 10 machine and wait for it to start after apparent update). no bueno :(

I followed the video from this thread like 8 times at least :(

 

Any hints?  

image.thumb.png.b69369c34dc88c9171068b2cde22e90d.png

in altirra version 4.10 there is a problem that was fixed in the test versions. but try version 4.01 i use that one. from version 3.20, 3.90 and 3.91 it should be supported.

  • Like 1
Link to comment
Share on other sites

8 hours ago, Pecus said:

I programmed a second button, but.... Joy 2B+ is an idiotic standard.

I do not agree with you, this format was designed to be easy to adapt to any joystick and anyone can do it. 😉
Another thing was kept the compatibility with the sega gampad that was 3 or 6 buttons since one of them worked as a second button with the ATARI.

And another important point also compatible with 2600 to use 2 buttons.

Edited by ascrnet
update
  • Like 1
Link to comment
Share on other sites

5 hours ago, Pecus said:

Old games for Atari use this standard?
Which ones? One title please :)

 

not originally, but the first game I remember using a sega gamepad was Gem Drop 1997 to use two buttons.
If you want more examples there are a lot in the github of the project it's a matter of searching.😉

Link to comment
Share on other sites

Plot twist. @Pecus squeezed the bytes and it seems like we have the second button working in Joy2B std. It mirrors `TAB`, i.e. weapon change.

https://github.com/pkali/scorch_src/tree/develop

This code works for both Joy2B+ (button pressed when joystick not connected) and the other way around, too (button released when joystick not connected).

 

Please check with the real hardware, especially with multiple Joy2B+ joysticks. We do not have them :(

 

 

@ascrnet thanks a bunch for the Altirra 4.10 info, I was feeling I'm getting gaslighted or something ;) 

Edited by pirx
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

9 hours ago, pirx said:

Please check with the real hardware, especially with multiple Joy2B+ joysticks. We do not have them :(

Works fine with my Joy2B+ Sega adapter, but players take turns using a single joystick even though I have two connected. How do I get it to recognise the second joystick?

 

Edit: I found out how to change the port number! Works fine with two Joy2B+ controllers, I don't have a 400/800 so I can't test with more.

  • Like 1
Link to comment
Share on other sites

@Eyvind Bernhardsen @ascrnet I have another test request, because we are afraid there might be a problem in a specific scenario. It somewhat works in emulator, but not sure about the real thing.

Setup:

2 joysticks. Joy2B in port 1, regular 1 button joystick in port 2.

In the game select 4 or 6 HUMAN players.

Assign odd players to port 1, even players to port 2.

Purchase a couple of weapons for each player.

Start playing. Change weapon using the second button in Joy2B.

Observe the next player using the regular joystick. There should be no effect whatsoever on the other player. What we afraid of is that the state change in Joy2B could trigger an unwanted change of weapon for the next player.

Link to comment
Share on other sites

@pirx Unfortunately, your suspicion was correct.

 

My setup:

Joy2B in Port 1, ordinary stick in Port 2.

4 players (named "A", "B", "C", and "D" respectively), each with baby missile/missile/baby nuke/nuke.

 

Turn order: "A" (joy2B), "C" (joy2B), "B" (ordinary stick), "D" (ordinary stick).

Every time "B"'s turn comes up, they end up switching to the next weapon immediately on starting their turn.

However, this does not occur with any of the other players (including D).

 

Edited by Bobo Cujo
(fixed to properly tag @pirx)
  • Thanks 1
Link to comment
Share on other sites

Actually, this happens with just 2 players too:

 

Joy2B in Port 1, ordinary stick in Port 2.

2 players (named "A" and "B"), each with baby missile/missile/baby nuke/nuke.

 

Turn order: "A" (joy2B), "B" (ordinary stick).

Every time "B"'s turn comes up, they end up switching to the next weapon immediately on starting their turn.

 

EDIT: This also happens if we have an ordinary stick in Port 1 and the Joy2B stick in Port 2.

In this case, "A" is the player that gets the involuntary weapon switch at the start of their turn.

Edited by Bobo Cujo
  • Thanks 1
Link to comment
Share on other sites

The same effect can also be seen in the initial Purchase Weapon screen before we even get to the main gameplay, likely for the exact same technical reason.

 

Using the same 2-player scenario from above:

"A" buys some weapons, and moves on beyond the purchase/activation screen.

"B" is immediately put in the Defensive page (since Button 2 toggles between the offense and defense item pages).

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...