Jump to content


+AtariAge Subscriber
  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by playsoft

  1. Having found the code above I then looked for other updates to the velocity variables, hoping to find something that was applying gravity. I found this:


    8186	B9 27 DE	LDA $DE27,Y
    8189	85 64		STA $64
    818B	B9 36 DE	LDA $DE36,Y
    818E	85 62		STA $62
    8190	B9 3B DE	LDA $DE3B,Y
    8193	85 63		STA $63
    81F8	BD 8B 22	LDA $228B,X ; velocity (low) = velocity (low) + gravity (low)
    81FB	18		CLC
    81FC	65 64		ADC $64
    81FE	9D 8B 22	STA $228B,X
    8201	A9 00		LDA #$00
    8203	7D A4 22	ADC $22A4,X ; velocity (high)
    8206	30 10		BMI L8218
    8208	C5 62		CMP $62     ; compare with max velocity
    820A	F0 17		BEQ L8223
    820C	90 15		BCC L8223
    820E	A9 00		LDA #$00    ; reset velocity (low)
    8210	9D 8B 22	STA $228B,X
    8213	A5 62		LDA $62     ; set max velocity
    8215	4C 23 82	JMP L8223
    8218	C5 63		CMP $63     ; compare with min velocity
    821A	B0 07		BCS L8223
    821C	A9 00		LDA #$00    ; reset velocity (low)
    821E	9D 8B 22	STA $228B,X
    8221	A5 63		LDA $63     ; set min velocity
    8223	9D A4 22	STA $22A4,X ; set velocity (high)
    8226	BD 8B 22	LDA $228B,X
    8229	18		CLC
    822A	7D 40 22	ADC $2240,X
    822D	9D 40 22	STA $2240,X
    8230	BD 6D 01	LDA $016D,X
    8233	7D A4 22	ADC $22A4,X
    8236	9D 6D 01	STA $016D,X
    8239	4C 70 82	JMP L8270

    Which is using the following tables:

    LDE27: .BYTE $0C,$14,$1E,$26,$00 ; gravity (low)
    LDE36: .BYTE $04,$04,$04,$04,$02 ; max velocity (high)
    LDE3B: .BYTE $FC,$FC,$FC,$FC,$FD ; min velocity (high)

    So it should also be possible to hack gravity.

    • Like 2

  2. The second thing I did was to see where the code reads the trigger and follow the path from there. I got to this routine which seems to be applying the flap acceleration to the velocity. I've added comments for what I think is going on:

    BCBD	B5 D0		LDA $D0,X
    BCBF	C9 08		CMP #$08
    BCC1	F0 34		BEQ LBCF7
    BCC3	BC 59 22	LDY $2259,X ; get flap index
    BCC6	38		SEC
    BCC7	BD 8B 22	LDA $228B,X ; velocity (low) = velocity (low) - flap acceleration (low)
    BCCD	9D 8B 22	STA $228B,X
    BCD0	BD A4 22	LDA $22A4,X ; velocity (high) = velocity (high) - flap acceleration (high)
    BCD3	F9 31 DE	SBC LDE31,Y
    BCD6	9D A4 22	STA $22A4,X
    BCD9	BD 72 22	LDA $2272,X
    BCDC	D0 03		BNE LBCE1
    BCDE	DE 6D 01	DEC $016D,X
    BCE1	A9 01		LDA #$01
    BCE3	9D 60 23	STA $2360,X
    BCE6	9D 72 22	STA $2272,X
    BCE9	A9 00		LDA #$00
    BCEB	9D 4A 01	STA $014A,X
    BCEE	E0 02		CPX #$02    ; x < 2 indicates player
    BCF0	B0 05		BCS LBCF7
    BCF2	A9 12		LDA #$12    ; flap sfx
    BCF4	4C 85 D4	JMP LD485
    BCF7	60		RTS

    So it's using 2 tables for the flap acceleration:

    LDE2C: .BYTE $80,$00,$5A,$DC,$00 ; flap acceleration (low)
    LDE31: .BYTE $00,$01,$01,$01,$01 ; flap acceleration (high)

    It seems that the first 3 columns are for the enemies, the fourth is the player but don't know what the last column is used for.


    So it would seem possible to hack the code to adjust the flap power. In the attached I set the first 3 columns to a really small value which stops the enemies from flying. One interesting thing here is that during an egg level, if you just sit on a high platform and don't do much you often end up stuck on that level; everything is cleared but nothing happens other than the occasional pterry attack. This could well be a bug in the original game which doesn't normally manifest itself because things aren't dropping into the lava so much.


    • Like 1

  3. I should start by saying that I am not interested in the bounty since it's best not to mix hobby and money plus the VS mode would be too much work. For that I think you'd pretty much need to understand all of the existing code and I've only done that once from a disassembly with 2600 Miniature Golf, which is a 2K ROM and took me a year.


    The first thing I noticed with the Joust ROM image is that the last 8K at $E000 is identical to the preceding 8K at $C000. It could be a 24K cart with the last 8K mirrored. This might be useful as it would provide free space for any hacks without having to increase the cart size (although that doesn't really matter as it could become a 48K cart).


    It's always good to have an expert player test to make sure nothing is broken. Maybe you can test the attached which is simply the Joust ROM with the last 8K blanked out (other than the 6502 vectors). Hopefully this will play exactly as the original and will mean that the last 8K is available for hacks.



    • Like 2
    • Thanks 1

  4. On 7/13/2021 at 5:17 PM, phuzaxeman said:

    Great info!  Blowsub def feels smoother playing with the cx52. 


    Looks like a lot of work to do conversions with the extra memory challenges.  Is it possible to do future 5200 hardware memory mods? 


    I do have Chop Suey on the 5200 so that's cool.  I actually bought that game in the 80s and I believe it came from the Europe.


    Probably the best way to get another martial arts game on the 5200 would be someone finishing Black Belt.  Graphics look really neat and the concept is great.  Whomever started that game had a great vision.  It's unfortunate that it was incomplete.  Maybe someone will pick it up one day.


    Thanks for sharing 7800 Arkanoid.  I'll check it out.



    Yes, Chop Suey was published by English Software originally. That needs a 48K A8 so whoever ported it will have put some effort into doing it.


    I'm not a h/w guy so can't say how feasible a memory mod is. Probably the most basic would be to have 32K RAM at $4000..BFFF which is swapped out when a cart is present. The cart would need to be able to disable itself, so that you can copy the program from the cart into RAM. It would be nice if the unused address space between the chips could also be mapped to RAM as A8 games often make OS calls that require replacement routines when ported to the 5200.


    With regards to Black Belt I think it depends on what's missing/wrong. If there are bugs that the original programmer couldn't fix they will be difficult for someone else to. When adding new functionality it depends on how much of the code you need to understand. When porting a game to the 5200 you don't really need to understand how it works; you are looking at what is code and what is data, what can go in ROM and what needs to go in RAM. The only occasion I put the effort in to fully understand a disassembly was when porting VCS Miniature Golf to the A8/5200/SNES. It's only a 2K ROM but I spread that out over the course of a year, although I was learning how the VCS worked at the same time.



    • Like 1

  5. 15 hours ago, phuzaxeman said:

    Thanks for the details on Karateka.  Sounds like a big job.  Maybe Ninja or Bruce Lee would be easier?


    One of the reasons I like Blowsub is it has that Air Sea Battle feel but uses the analog sticks.  What makes the 5200 shine is the analog sticks.  And when everything is working right with the analog sticks, the sticks and keypad games give a different gaming experience.  Magical Fairy and Curling along with classics like Galaxian, Pole Position, Baseball, Centipede, Star Raiders all have that analog feel that makes the 5200 a different console than the normal 8bit. 


    Have you every played Arkanoid on the 8bit?  I think someone was working on updating or releasing a new 8bit version.  What kind work does it take to make a game play with analog controls like you did on Blowsub.  I'm not an expert but was wondering.

    Ninja needs a XL so probably not, although if it's just uncompressing itself into the extra memory you might be able to do something with a bank switching cart. Bruce Lee looks more promising but it would still be a lot of work. The only easy ones are those which run on an unexpanded 400 or 600XL.


    The CX52 joystick is really 2 paddle controllers so the code in Blowsub which reads the A8 paddles is also used to read the 5200 joystick. One thing I did in Blowsub for paddle control was to move the ship to the mid-point of the old and new positions first, so that it looked more like the ship was moving between them rather than instantly appearing at the new position.


    Sometimes for digital control with the CX52 I split the controller range into 9 zones, dead zone in the middle and 4 either side to give 4 different speeds depending on how far you move the joystick (try Scramble or Yars' Strike). I'm not sure it plays any better than when using a digital stick, but control with the CX52 seems smoother this way.


    I don't know about a new A8 Arkanoid but there is one in development for the 7800 which looks great: 7800 Arkanoid WIP



    • Like 1

  6. 13 hours ago, phuzaxeman said:

    Hey, I just played BlownSub for the first time and I really liked it. Fun game that has analog controls. Thanks for sharing. 


    Also, I just played Asteroids with the keypad and it's really awesome.  Thanks. 



    Quick question, and I'm not asking for anyone to port. But is it possible for 8bit Karateka to be ported to the 5200? The keypad controls would be pretty cool. Just wondering.  Wish there were more martial arts games.



    Thanks, out of them all Blowsub is my favourite.


    It's hard to say with Karateka. It is using mode E graphics, which is a bitmap mode and it keeps 2 screen buffers so that one is displayed while the other is drawn. This requires 12K RAM so that only leaves 4K on the 5200 for everything else. Even if that was enough RAM the A8 program is a 90K disk/128K cart so it would be quite an undertaking to try and disassemble and modify something of that size - it could well take longer than programming a new martial arts game from scratch.

    • Like 1

  7. 18 hours ago, darryl1970 said:

    I tried these on actual hardware, and it was actually decent. This was never a fun port for me. I didn't realize the asteroids were in slow mode though. I am pretty sure the original unfinished version calibrated the stick after rotating it in all directions. This is much better.


    I also thought the game was just dog-slow. This was actually pretty fun, and it felt like Asteroids. I was able to play well with the stock controller. (I didn't try the keypad version yet.)


    Great job and Thanks!

    It is still slow, taking 5 frames to do everything, so running at 12fps. I did wonder if improving the asteroid drawing routines would help but I think it splits the processing over those 5 frames so I don't think there's any easy way of speeding it up.

    • Like 1
    • Thanks 1

  8. 2 hours ago, Keatah said:

    Not sure on that. It's way way too fast. If this is slower on real hardware - I'm happy work it out in the Altirra thread.

    You must be playing the _a version which has hacked the defence so that it operates more quickly? That then is the reason why the defence activates slowly in the original, so that the flip over is not too fast.


    For now you could play asteroids_CXL4013.bin if you are using flip over as this version functions as per the original; play asteroids_CXL4013_a.bin if you want the hack for fast activating shields or hyperspace. I will see if I can add another hack for it to operate differently depending on which defence is selected.

  9. 9 hours ago, Tempest said:

    Can someone verify this for me?  I tried on my 5200 but it didn't seem to work.  Then again my stick is pretty decent so the game is not nearly as out of control as it can be with other sticks.

    Yes. The 5200 prototype bases the thresholds (for up/down/left/right) on the range of values it's seen from the joystick. So you need to move the joystick fully up, fully down, fully left and fully right before control will function properly.


    This would be an odd thing to have in a commercial release without there being some sort of prompt, but this was just a prototype. Since they had the A8 source code it was probably only a few hours work for someone at Atari to put the prototype together. It may have been just to test what Asteroids would play like with a CX52. 

  10. 15 hours ago, Tempest said:

    Interesting.  I'll have to spend some more time with it I guess.  I never looked at them very closely due to the 5200 version being almost unplayable.


    How much was changed between the 400/800 and the 5200 prototype?  Other than removing the copyright message and attempting to map the controls, was anything else changed?

    I've not looked at the 5200 prototype in detail, but it doesn't seem possible to change the defence option (you can step through them with * but it is not selected when you press the trigger). I'm also not sure how you select fast asteroids, but I did manage to do it once.

  11. Just now, Keatah said:

    Not sure on that. It's way way too fast. If this is slower on real hardware - I'm happy work it out in the Altirra thread.

    I don't think there is anything wrong with Altirra or anything wrong with my port to the 5200 as I just tested the Asteroids.rom image from atarimania (which is what I disassembled and ported) on a 130XE via a UNO cart and it is exactly the same.


  12. This won't be enough to bring it up to a C- but it's a port of the (released) A8 version with the controls mapped:


    start = start game

    pause = pause/resume game

    * = defence option (you have to press the trigger to choose it)

    # = number of players/game type

    8 = bounce on/off

    0 = fast/slow asteroids


    It seems to work OK. The _a version has a couple of minor mods, disabled attract mode and sped the defence option up (it was intentionally slow, don't know why).


    asteroids_CXL4013.bin asteroids_CXL4013_a.bin

    • Thanks 4

  13. 3 hours ago, Tempest said:

    That should probably be CGE Services as in the Classic Gaming Expo that the DP guys used to host out in Vegas back in the late 90's and 2000's.  I know John Hardie got his hands on a bunch of 5200 prototypes from Dan Kramer and some other sources, dumped them, and released them around that time.  It would appear that Asteroids was one of those prototypes.

    Interesting, I wondered if anyone would know (I googled CFE Services and Hardie but didn't get any hits).

  14. It seems to me like the A8 original game also takes a long time to activate the shields but it does have flip over, hyperspace and no effect - where the 5200 prototype has shields regardless of the selection.


    Edit: Looking at the A8 original 8K cart every byte appears to be used; on the 5200 prototype it looks like there's about 1.5K free so maybe flip over and hyperspace were removed.

    • Like 1
    • Thanks 1

  15. On 7/2/2021 at 6:07 AM, phuzaxeman said:

    I have a vector asteroids version that is decent.  Looks like a hack.  The controls turn at the beginning but its playable.

    This is what I'd expect from the (unhacked) 5200 prototype. It allocates the dead zone based on the range of values it gets from the controllers so it won't know that range until it's seen a full up/down/left/right on the joystick. Once it's had that it's playable.


    5 hours ago, BIGHMW said:

    Quite interesting that the 16K ROM I had was actually an 8K port doubled up, perhaps that and the threshold it (and the other 5200 Asteroids ports before this) used at that time that was causing the erratic control on this (otherwise) terrific game. I am having much better control now the fixed threshold you included in this hack made the differrence. :) 


    BTW, as for the re-calibration process this same problem also occurred with my other 2 5200 units I owned prior to the one I'm currently using (my original 4-port I got for my 17th Birthday back in 1983, and also my a/v-modded 4-port) as well, do I feel fortunate to have tremendously-talented (and nice) guys like you who are able to just do wonders to make these classics come alive and this was one hack that was 39 years in the making and now puts the 5200 back on top if it came to owning only one system.


    Yeah the XEGS may have tons of the best titles, but, the 5200 has tons of the best titles (notice the bold type of certain words when describing both units), and sometimes quality will always beat quantity, and in this case it does. So yeah while it is true that Big Sexy might not be able to play everything, she has all the hits, just like a good-old AM Top-40 radio station used to have in my day growing up as a kid down in L.A. (born in 1966, moved to the Northwest in 1987)

    It would be best to use an image dumped straight from the prototype cart but I don't imagine the controller code was modified. I am sure the first thing Atari would have tried is a simple fixed threshold. Perhaps this more sophisticated method was an attempt to improve on it that backfired and it just happens to be this prototype cart that was found. Or it's over engineering. Or all of your consoles are out. When I next set up my 5200 I will see how the unhacked prototype plays for me.

    • Like 1

  16. On 7/3/2021 at 6:07 PM, BIGHMW said:

    Thanks, and here it is again if anybody wants to take it on :)  Take care and peace out everybody!!!



    Asteroids.bin 16 kB · 3 downloads Asteroids.xex 8.07 kB · 3 downloads

    Well I guess you're never going to tell me what values you get from your controllers, so here is the original Asteroids port hacked to use a fixed threshold (same as Wing War). I've only tested controller #1 under emulation but if it works for you please do not call it a "fix" or the original port "botched" because I suspect there is nothing wrong with it, just that the more sophisticated threshold algorithm might not work so well on a 38 year old console that has never been recalibrated.


    By the way I don't know where your 16K image comes from but the two 8K halves are identical other than what looks like 3 rows of screen data containing:





    • Like 1
    • Thanks 1
  • Create New...