Jump to content
IGNORED

You guys can thank UniWarS for this one... (Galaxian?)


PacManPlus

Recommended Posts

On 3/15/2021 at 1:20 PM, gambler172 said:

If this is TIS,it is damn good..  sounds like the

Arcade..  i see no need to do Pokey.

Everything is good except the firing sound, which I assume is placeholder. Sounds far too harsh and buzzy compared to the soft whoosh of the arcade shots.

  • Like 1
Link to comment
Share on other sites

Ok...  Here is what I have so far!

 

I have finished 'porting' over the Z80 code to 6502, and while I had to make adjustments to fit with the way I lay out my games, I think it turned out pretty good!  However, it seems VERY difficult, so there may be some 'adjusting' I may need to do.

So, what I think I have left:

 

- Possibly adjust 'normal' (i.e. arcade) difficulty

- Implement 'easy' and 'hard' difficulty

- Fix up sounds

- Implement 'game demo' mode during attract mode

 

Once I fix up the sounds, I think I may actually remove the Pokey section, (please forgive me @Synthpopalooza - I will need you for other things I plan on working on, if it's ok) ... I don't think this game needs it too much and I believe I can get closer with the shot, drone, and dive sounds.  Also I can use the few cycles that check every time it plays a sound.

 

Here you go, please enjoy and let me know what you think:

 

 

 

Galaxian.A78 Galaxian.BIN

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

Just gave the latest binary a try on my Dragonfly. Very nice. :)

 

Couple small things. First, the header still shows this as UniWars when you load it up on the DF cart. Not a biggie but wanted to point it out. Second, does this build still include POKEY sound? The TIA sounds are excellent but my DF cart apparently only “sees” the TIA code based on the title screen. I don’t know if I need to dig into the DF menus to see if there’s a way to force POKEY or something. 
 

Last, there seems to be a stray stuck pixel at the upper left of the screen. I have not tested yet on my Concerto to see if it’s a DF-specific problem or not. 
 

But still and all, great work! I have always sucked at Galaxian but still enjoy it. :) 

 

8CB381E4-CE88-46F6-8483-CF9B37EBE05F.jpeg

DF1D44E9-EA1F-4EF4-AD2A-23EA81657218.jpeg

  • Like 1
Link to comment
Share on other sites

36 minutes ago, PacManPlus said:

Ok...  Here is what I have so far!

 

I have finished 'porting' over the Z80 code to 6502, and while I had to make adjustments to fit with the way I lay out my games, I think it turned out pretty good!  However, it seems VERY difficult, so there may be some 'adjusting' I may need to do.

So, what I think I have left:

 

- Possibly adjust 'normal' (i.e. arcade) difficulty

 

Could this be based off of the arcade game's DIP switches?  I'm not 100% certain how they may affect gameplay, but they do definitely affect number of starting lives and the score at which a bonus life is awarded.

 

Quote

- Implement 'easy' and 'hard' difficulty

- Fix up sounds

- Implement 'game demo' mode during attract mode

 

Once I fix up the sounds, I think I may actually remove the Pokey section, (please forgive me @Synthpopalooza - I will need you for other things I plan on working on, if it's ok) ... I don't think this game needs it too much and I believe I can get closer with the shot, drone, and dive sounds.  Also I can use the few cycles that check every time it plays a sound.

 

Here you go, please enjoy and let me know what you think:

Sorry to lose POKEY, but TIA sounds great.  Quite honestly, if I hadn't heard the POKEY sounds previously, I don't think I'd really be aware of there being a difference - both fit the game very well.

 

One thing I did notice: there's a stack of four pixels in the upper-left corner of the screen.  They're visible in both the attract mode and during gameplay.  Are these intentional?

 

And yes - another excellent WIP :-D  Thank you!

Edited by x=usr(1536)
Link to comment
Share on other sites

5 minutes ago, DrVenkman said:

I have not tested yet on my Concerto to see if it’s a DF-specific problem or not. 

Seeing it here on my Concerto, so I'm going with non-specific :-D

5 minutes ago, DrVenkman said:

The TIA sounds are excellent but my DF cart apparently only “sees” the TIA code based on the title screen.

Yep, seeing the same behaviour here.  Not 100% certain about this, but I think that Bob (based on his earlier comment) may have disabled POKEY sound already.

Edited by x=usr(1536)
Link to comment
Share on other sites

22 minutes ago, sramirez2008 said:

Btw, it’s definitely harder.

Yes, quite a bit.  On previous versions, I could get into 5-digit scores without too much trouble.  On this one, I'm lucky to make it out of the 3-digit range :-D

 

Then again, arcade Galaxian was never one of my strongest games.  Always liked it, but was never very good at it.  Perhaps it's just more arcade-accurate now ;)

Link to comment
Share on other sites

This one IS more difficult, even the 'easy' version acts like the old 'normal' did in the last build, I can't get through the first wave, maybe I just need some more practice but definitely a beautiful job of the new opening graphics. I especially love the "Galaxian" logo and how it came out. The whole game reeks of arcade quality through and through, it's just too bad I don't have a POKEY chip in my Concerto otherwise who knows what she really would sound like, but the TIA sound is definitely top notch.

 

The whole thing is now TOP NOTCH!!! It was already, but the new opening graphic just puts it over the top.

 

When I order from Best this coming time, I will order 2 RCA-to-PAL (European version, for both my RF-to-HDMI converter and also its sister RF-to-AV (composite) converter as they both have PAL antenna input jacks I also own that I bought on eBay) RF cables and also that aforementioned POKEY chip, I just need Best's phone number so I can place the order next week, do they still take orders over the phone with my VISA card??? But I definitely need to get a POKEY chip installed so I can fully exploit the (currently untapped) capabilities that exist in the 7800.

 

BTW, after that the next order will be for 2 Best-modded CX24 7800 ProLine/Painline (if you insist on me using that term) controllers CX52 5200 controller too so I will then have 2 of those as well. Then I will order a 3-D printed 7800 dual controller holder after that , I already have one dual holder for the 5200 sticks (I had 2 holders as I owned carts of Space Dungeon and Robotron).

 

Those 7800 dual controller holders are available right here: https://www.vintagecomputercenter.com/product/atari-7800-joystick-coupler

 

The next question afterwards is can I send my Concerto and the POKEY down to @batari so I don't break the cartridge shell in the process of installation and have him (and I'll pay him for it) properly install it so I don't blow it up or have it fry the circuitry in my cart.

 

But overall extremely impressive, and it looks like I'd have to scale back to the 'easy' (to put it lightly) mode until I can get up there again as this build was definitely a game changer. When I have the POKEY installed it'll be even better, even though the TIA was great too.

Link to comment
Share on other sites

1 hour ago, DrVenkman said:

the background is still scrolling and you can move your ship but a new wave doesn’t start. 

This is exactly what I'm experiencing.  Tried it with 3 and 5 lives, just because and the same thing happens regardless of how many lives you start off with.

Link to comment
Share on other sites

Hi Guys

 

- Ok, I found and fixed the 'end of wave' issue...  It turns out a routine wasn't being called that updated the stats on the alien swarm. :(  This means I'm adding cycles to something already maxed out.  I've made the call to the routine, but now you can see moments of noticeable slowdown, especially when the flagship with two escorts are attacking. :( 

 

I will try to work on that, but I might need help from someone who is good at reducing cycles to give this a look-see.

 

Also, the stray bullet that appeared stationary at the top left of the screen has been removed.  Finally, I have removed all Pokey calls from the game.

 

So now what I have left is:

  • Try to free some cycle time
  • Finish sounds
  • Adjust 'normal' (i.e. Arcade) difficulty
  • Implement 'easy' and 'hard' difficulty 
  • Implement Game Demo during attract mode
  • Somehow indicate level number (don't have space for flags, so I'll find some other option)

This one should work better...

 

EDIT - 9:15 PM  Replaced binaries, got a compiler error.

 

Galaxian.A78 Galaxian.BIN

Edited by PacManPlus
COMPILE ERROR
  • Like 5
Link to comment
Share on other sites

What's interesting is that the next routine that uses the most cycles is the background star movement.  I'm using a single-byte sprite for the star (one per zone) and adjusting the high address and horizontal position of each one in each zone every frame.

 

I tried *not* calling the star movement routine, and there is no slowdown.  I don't really want to get rid of the starfield, so if anyone knows some tricks for this I'm all ears:

;	DOSTARS - PROCESS THE BACKGROUND STARS ONCE EVERY OTHER FRAME
;	INPUT: NONE
;	USES: A, X (GETS SAVED), Y (GETS SAVED), TEMP0, TEMP1, TEMP2
DOSTARS
	LDA RTLOCAL+1
	AND #$01
	BNE DOSSTART
	RTS
DOSSTART
	TXA											;SAVE REGISTERS
	PHA
	TYA
	PHA
	LDX #$00									;START FROM THE TOP ZONE
	LDA #OFFSCRN
	STA TEMP2									;THIS FLAGS TO PUT THE STAR IN THE NEXT LOWER ZONE
DOSLOOP
	LDA DLLO,X									;GET THE ADDRESS OF THE FIRST DISPLAY LIST IN THAT ZONE
	STA TEMP0
	LDA DLHI,X									;(THAT IS THE ONE FOR THE STARS)
	STA TEMP1
	LDA TEMP2									;SEE IF WE ARE CARRYING DOWN A STAR FROM THE ABOVE ZONE
	CMP #OFFSCRN
	BEQ DOSLNORMAL								;NOPE, JUST MOVE THIS STAR
	LDY #$03
	STA (TEMP0),Y								;HORIZONTAL POSITION OF STAR ON LOWER ZONE
	LDA #OFFSCRN
	STA TEMP2									;TURN OFF FLAG
	LDA #$00
	STA STARS,X									;START AT THE TOP OF THE ZONE
	JMP DOSLWRITESTAR
DOSLNORMAL
	LDY #$03
	LDA (TEMP0),Y								;SEE IF IT'S ACTIVE
	CMP #OFFSCRN
	BEQ DOSNEXT									;NOPE - GO ON TO THE NEXT ONE
	LDA STARS,X									;GET THE CURRENT SCANLINE WITHIN THE CURRENT ZONE
	CLC
	ADC #$01									;ADD ONE TO THE CURRENT SCANLINE
	AND #$07									;MAKE SURE IT'S BETWEEN $00 AND $07
	STA STARS,X
	BNE DOSLWRITESTAR
DOSLDOWNZONE
	LDA (TEMP0),Y								;WRAPPED AROUND TO ZERO - MOVE THE STAR DOWN ONE ZONE
	STA TEMP2
	LDA #OFFSCRN 
	STA (TEMP0),Y
	LDA #$00
DOSLWRITESTAR
	CLC
	ADC #>(STAMPS+$0000)
	LDY #$02
	STA (TEMP0),Y
DOSNEXT
	INX
	CPX #LASTZONE
	BMI DOSLOOP

	;NOW CHECK TO SEE IF THE FIRST ZONE NEEDS A NEW STAR
	LDA DLLO
	STA TEMP0
	LDA DLHI
	STA TEMP1
	LDY #$03
	LDA (TEMP0),Y
	CMP #OFFSCRN								;DO WE NEED A NEW STAR?
	BNE DOSEXIT									;NO, JUST EXIT
	INC STARS									;YES, BUT WE NEED TO DELAY FOR 1 FRAME
	LDA STARS
	CMP #$01
	BEQ DOSEXIT
	JSR RAND									;YES!
	AND #$7F									;RANGE 0-127
	;CMP #$70									;OUTSIDE THE RANGE OF THE PLAYFIELD?
	;BCS DOSEXIT
	CLC
	ADC #LEFTSIDE - 8							;NOW IT'S 16-144
	STA (TEMP0),Y
	LDA #$00
	STA STARS
DOSEXIT
	PLA
	TAY
	PLA
	TAX
	RTS

Thanks, guys

 

Link to comment
Share on other sites

3 hours ago, PacManPlus said:

now you can see moments of noticeable slowdown, especially when the flagship with two escorts are attacking. :( 

Slowdown is noticeable and the game freezes up, at least it does for me while playing on the Dragonfly (video attached)

  • Thanks 1
Link to comment
Share on other sites

4 hours ago, PacManPlus said:

What's interesting is that the next routine that uses the most cycles is the background star movement.  I'm using a single-byte sprite for the star (one per zone) and adjusting the high address and horizontal position of each one in each zone every frame.

 

I tried *not* calling the star movement routine, and there is no slowdown.  I don't really want to get rid of the starfield, so if anyone knows some tricks for this I'm all ears:

...

Thanks, guys

 

I don't completely grok this yet but have a few ideas and questions:

  1. DOSTARS: BNE to RTS (either the one at the end of the routine, or if that's too far away, put one right before DOSTARS) to trade a cycle from the frames that move stars to the frames that don't. (If there is some expensive operation elsewhere when RTLOCAL+1 is even, BEQ to RTS. Otherwise I like BNE better since idea #4 below uses the 0 in A.)
  2. DOSSTART/DOSEXIT: is it necessary to preserve X and Y? Skipping that will save 22 cycles.
  3. DOSLOOP/DOSLNORMAL: use 0 instead of OFFSCRN and omit every CMP #OFFSCRN to save 2+ cycles per zone. Also omit the LDA #$00 in DOSLOOP since A is already #OFFSCRN which is now 0.
  4. DOSSTART: if #1 and #3 were done, omit LDA #OFFSCRN since A is already 0 (since non-zero branched to RTS) and #OFFSCRN is 0. Even if the preserve X and Y must be kept, just STA TEMP2 before pushing X and Y to the stack. Either way will save 2 cycles.
  5. I think if you CLC in DOSSTART, you can omit the CLCs in DOSLNORMAL and DOSLWRITESTAR to save 4 cycles per star. I'm fairly sure about the second one (STARS,X is always 0-7 so adding 1 cannot set C), less confident about the first (I don't know what >(STAMPS+$0000) is).
  6. DOSNEXT: change ADC to #LEFTSIDE - 9 and get rid of the CLC to save 2 cycles.
  7. Ensure the branch to DOSLOOP does not cross a page boundary. Crossing pages costs a cycle per zone.
  8. Inlining this routine would save 12 cycles. But #7 is more important.
  9. How many zones are there?
  10. How many bytes do you have free in zero page?
  11. What RAND are you using? I've seen some people recommend the Fibonacci generator, but the Galois generator is much more efficient. Both are described here.
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

Good Morning!

 

Thank you all for the replies, and thank you @Pat Brady for the nice details on how to save cycles.

 

What I ended up doing overnight was completely rewriting the 'dostars' routine.  It's about as bare essentials as you can get, no loops, doesn't use X or Y.  It takes up quite a bit more code space, but as long as it is more efficient, that's what I need.  I also found out during this that the INC I was using, uses 3 times the cycles (6 total) as an ADC (2 total) which I now use.  All this time I thought it was the other way around.

 

Regarding the RAND routine I'm using, it's changed over the years of me doing this, can't remember where I got this one:

RAND
    LDA NEWRAND
    LSR
    ROL NEWRAND+1
    BCC RANDNOEOR
    EOR #$B4
RANDNOEOR
    ADC RTLOCAL+1
    CLC
    STA NEWRAND
    EOR NEWRAND+1
    LDA NEWRAND
    RTS

 

Anyway, with all that, here is the next update.  VERY little slowdown, if any.

So after this, my 'todo' list hasn't changed:

  • Try to free some cycle time (although not as imperative now)
  • Finish sounds
  • Adjust 'normal' (i.e. Arcade) difficulty
  • Implement 'easy' and 'hard' difficulty 
  • Implement Game Demo during attract mode
  • Somehow indicate level number (don't have space for flags, so I'll find some other option).  I may actually use the flags in the middle of the top line and just switch them out per player.

Thanks guys!

Galaxian.A78 Galaxian.BIN

  • Like 11
  • Thanks 3
Link to comment
Share on other sites

Since you have created something with extreme fidelity to the arcade version, I would personally suggest having one of the difficulty settings exactly match the arcade difficulty level as well. If the default arcade difficulty is too difficult for "normal", then I'd keep it as it is and rename it as the "arcade" difficulty setting, maybe situated between "normal" and "hard"?

  • Like 1
Link to comment
Share on other sites

Ok, I think I have a handle on the difficulty and the other modes (easy, hard)...  But let me tell you, 'hard' difficulty is going to be *INSANE* :evil:

 

EDIT - Wow, Namco was brutal.  Not only are there no difficulty dip switches, but the 'lives' dip switch allows between '2' and '3' lives! (i.e. no '5' lives setting)... Ouch!

 

EDIT2 - Apparently the Japanese version allowed for 5 lives.

Edited by PacManPlus
Apparently I still can't spell simple words
  • Like 1
  • Haha 1
Link to comment
Share on other sites

24 minutes ago, PacManPlus said:

EDIT - Wow, Namco was money hungry.  Not only are there no difficulty dip switches, but the 'lives' dip switch allows between '2' and '3' lives! (i.e. no '5' lives setting)... Ouch!

FTFY - Can't have people standing there too long playing.  Need more quarters...lol. :-D

  • Haha 5
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...