Jump to content



2

Galaxian - Expanded


45 replies to this topic

#26 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,458 posts
  • Location:The land of Gorch

Posted Tue Aug 31, 2010 11:11 PM

Sprites that don't use 6 pixels cause problems with positioning...because the reflect register is used to "fill in the gaps". While it's easy to alter the sprites to look more arcade-like (heck, just invoke Kevin's sprites that are already present in the assembly file), they won't move that way - they'd be wobbling around just like the flagships do if the reflect registers stay in, or move really herky-jerky if the reflect registers are taken out (which subsequently makes them easier to hit, too...since they would be stationary 2 frames out of 3). Neither one was an attractive solution IMO, so I kept Atari's original sprites in. As mentioned before, I only used 7 pixels on the flagship because A) a 6-pixel version looks worse than the wobble; and B) flagships wobbling in the convoy are easier to hit - costing the player potential bonus points if not targeting the convoy carefully to avoid them. The better solution is to fix the positioning so that reflect isn't required to fill in the gaps, but that is beyond me. Just looking at the multi-RESP0 demo code makes my brane hert.

Still no luck altering the routine for an 8th convoy sprite. I run short of cycles in setup in a couple of places, and I still never located any free ram to hold it's status. I have unrolled the loops in a 16k build, tho...might use the extra space to update color info of the independant sprite instead - that looks easier to do...and it would look a lot better if the sprites didn't become monocolor as they charge the ship.

#27 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,544 posts
  • Location:Georgia, USA

Posted Wed Sep 1, 2010 1:44 AM

View PostNukey Shay, on Tue Aug 31, 2010 11:11 PM, said:

Just looking at the multi-RESP0 demo code makes my brane hert.
I've been experimenting with multi-RESP0 code (in emulation only for now), and I finally understand it better. In particular, I always wondered why the last sprite didn't have the same spacing as the others, and now I get it. The "Atari 2600 TIA Hardware Notes" document by Andrew Towers says

Quote

For better or worse, the manual 'reset' signal (RESP0) does not
generate a START signal for graphics output. This means that
you must always do a 'reset' then wait for the counter to
wrap around (160 CLK later) before the main copy of the player
will appear. However, if you have any of the 'close', 'medium'
or 'far' copies of the player enabled in NUSIZ, these will be
drawn on the current and subsequent scanlines as the appropriate
decodes are reached and generate their START signals.
However, the second sentence is incorrect. There are 4 possible START signals on a line-- really the same signal, of course, but generated up to 4 times, at values 101101, 111000, 101111, and 111001 of the player0 horizontal position counter.

101101 (count 39) generates a START signal and resets the counter to 000000, so it precedes the main copy of the player. Since RESP0 resets the counter to 000000 but doesn't generate a START signal, you normally have to wait for the counter to get to 101101 before the main copy appears, which means it doesn't appear until the next scan line.

111000 (count 3) generates a START signal that causes the near copy of the player to appear if bit 0 of NUSIZ0 is on (as long as bit 2 is not on as well).

101111 (count 7) generates a START signal that causes the middle copy of the player to appear if bit 1 of NUSIZ0 is on (as long as bits 0 and 2 are not both on as well).

111001 (count 15) generates a START signal that causes the far copy of the player to appear if bit 2 of NUSIZ0 is on (as long as bit 0 is not on as well).

The START signal is active for 4 color clocks (1 horizontal count). If you strobe RESP0 such that it ends while the START signal is active, you get the main copy of player0 right away, without having to wait until the next scan line. Based on the second sentence in the above quote, I always thought that when you trigger RESP0 multiple times on a line, you're just getting the extra copies of the player, not the main copy. However, that's true only if RESP0 ends while the START signal is inactive.

Consider the following examples:

   LDA #% 00000011
   STA NUSIZ0
   STA RESP0
   sleep 3
   STA RESP0
Here, you'll get 3 copies of player0-- main, near, and middle. That means if you wait long enough, then do RESP0, sleep 3, RESP0 again, you can get 3 more copies of player0 on the same line. Each triplet will be perfectly spaced (i.e., 8 color clocks between each copy). This means you could get 12 sprites on a line by doing the following:

   LDA #% 00000011
   STA NUSIZ0
   STA NUSIZ1
   STA RESP0
   STA RESP1
   STA RESP0 ; this gives you 3 copies of player0
   STA RESP1 ; this gives you 3 copies of player1
   sleep 5 ; or longer
   STA RESP0
   STA RESP1
   STA RESP0 ; this gives you 3 more copies of player0
   STA RESP1 ; this gives you 3 more copies of player1
Although you wouldn't have enough time to load unique values for each copy of player0 and player1, you could display the icons for up to 12 spare lives, or something like that, although they wouldn't be evenly spaced. Or, if you sleep 11 instead of sleep 5, you can get 6 sprites, a nice gap, then 6 more sprites, such that you could display up to 6 spare lives for one player on the left half of the screen, and up to 6 spare lives for a second player on the right half of the screen, in a 2-player game. Instead of sleep 11, you could use that time to load different graphics for the second set of 6 spare lives (if the second player had a differently-shaped ship), or a different color (like red for the first player's spare lives, and green for the second player's spare lives).

   LDA #% 00000011
   STA NUSIZ0
   STA RESP0
   sleep 3
   STA RESP0
   sleep 3
   STA RESP0
Here, you get 4 copies of player0-- but they aren't near, near, near, middle as I'd always thought. Rather, they're main, main, near, middle. The 2 main copies are 9 color clocks apart, and the rest are 8 color clocks apart.

   LDA #% 00000001
   STA NUSIZ0
   STA RESP0
   sleep 3
   STA RESP0
   sleep 3
   STA RESP0
   sleep 3
   STA RESP0
   sleep 3
   STA RESP0
This is similar to the preceding example, but you get 5 copies-- main, main, main, main, near (not near, near, near, near, near as I'd always thought). The main copies are 9 color clocks apart, but there are 8 color clocks between the last main copy and the near copy. This is usually described as "the last copy is shifted left 1 pixel," but it isn't shifted at all-- it's right where it's supposed to be!

   LDA #% 00000010
   STA NUSIZ0
   STA RESP0
   sleep 8
   STA RESP0
Here you get 2 copies-- main and middle-- since the second RESP0 ends while the START signal is active for the first middle copy, so you don't get anything from the first RESP0, just the main and middle copies from the second RESP0.

   LDA #% 00000100
   STA NUSIZ0
   STA RESP0
   sleep 19
   STA RESP0
Here you again get 2 copies-- main and far-- since the second RESP0 ends while the START signal is active for the first far copy, so you don't get anything from the first RESP0, just the main and far copies from the second RESP0.

All of this may be really old hat for expert 2600 programmers, but the realization that you get the main copy right away as long as RESP0 ends while START is active was a big revelation for me, since it finally let me understand why the spacing seems to be off on the last sprite in the fourth example.

Another trick that could be used would be to display all 4 copies on a line-- main, near, middle, and far-- by using the first example, waiting a bit, then changing NUSIZ0 to % 00000100 or % 00000110.

Michael

Edited to fix the binary values. Dang forum software loves to eat % 00!

Weird. The only way I can seem to get % 00 left unmolested by the forum software is to leave a space between them. :?

Edited by SeaGtGruff, Wed Sep 1, 2010 1:58 AM.


#28 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,544 posts
  • Location:Georgia, USA

Posted Wed Sep 1, 2010 6:06 AM

View PostSeaGtGruff, on Wed Sep 1, 2010 1:44 AM, said:

This means you could get 12 sprites on a line by doing the following:

   LDA #% 00000011
   STA NUSIZ0
   STA NUSIZ1
   STA RESP0
   STA RESP1
   STA RESP0 ; this gives you 3 copies of player0
   STA RESP1 ; this gives you 3 copies of player1
   sleep 5 ; or longer
   STA RESP0
   STA RESP1
   STA RESP0 ; this gives you 3 more copies of player0
   STA RESP1 ; this gives you 3 more copies of player1
Although you wouldn't have enough time to load unique values for each copy of player0 and player1, you could display the icons for up to 12 spare lives, or something like that, although they wouldn't be evenly spaced. Or, if you sleep 11 instead of sleep 5, you can get 6 sprites, a nice gap, then 6 more sprites, such that you could display up to 6 spare lives for one player on the left half of the screen, and up to 6 spare lives for a second player on the right half of the screen, in a 2-player game. Instead of sleep 11, you could use that time to load different graphics for the second set of 6 spare lives (if the second player had a differently-shaped ship), or a different color (like red for the first player's spare lives, and green for the second player's spare lives).
Scratch what I said about changing the graphics or color between the 2 sets of spare lives-- it don't work so good. But you can have 2 sets of 6 spare lives with the same graphics and color. You'd need multiple versions of the loop to handle the different numbers, and now I'm not sure how well changing NUSIZ0 and NUSIZ1 midline will work out timing wise. If I get it working, I'll post it as a bB minikernel.

Michael

Teaser screenshot

Attached Thumbnails

  • spare lives.png

Edited by SeaGtGruff, Wed Sep 1, 2010 6:09 AM.


#29 Animan OFFLINE  

Animan

    River Patroller

  • 2,124 posts
  • I'm a guy... I just happen to like Sailor Moon.

Posted Mon Sep 6, 2010 8:55 PM

I chuckled when I saw the startup screen. Definitely gives new meaning to "Plays just like the arcade game!".

So far, this looks great. Exceeded my expectations.

#30 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,458 posts
  • Location:The land of Gorch

Posted Tue Sep 7, 2010 10:07 PM

For those interested in easter eggs...the magic number is 4.

#31 maiki OFFLINE  

maiki

    Moonsweeper

  • 396 posts

Posted Tue Sep 28, 2010 5:51 PM

Just tried the PAL60 version. What a great choice of vibrant colours and attract mode scoreboard!

Two things that might perhaps make it even better:

1. the shooting sound is too rough... it would be nice if the noise was softer, closer to the arcade machine
2. I'm missing the scrolling rasterlines in the scoreboard

Edited by maiki, Tue Sep 28, 2010 5:52 PM.


#32 NE146 ONLINE  

NE146

    Dumbass Atari Fan

  • 12,576 posts
  • Location:Seattle, WA

Posted Tue Sep 28, 2010 10:21 PM

Ok it took me a while (it always does) but I already am in love with it as is. Being an arcade kid in the 70's & 80's VCS days, this is exactly the kind of homebrew/hack I like to see. :P From the arcade-like startup, to the 'attract mode' screens this thing is awesome. And the colors & relatively accurate ship graphic make this a game that would've made me shat a brick had I seen it in 1980 :lol: Awesome job Nukey

So far I've only played through 2 levels so I haven't gotten real in depth in it to see the difficulty, etc. But why don't you just spill the beans on what the easter egg is already. Is it something on level 4? :)

#33 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,458 posts
  • Location:The land of Gorch

Posted Wed Sep 29, 2010 4:19 PM

Really? I think that it's relatively easy to trigger it in this hack (when compared to secrets I hid in other hacks)...just score well. Try waiting for aliens to charge before shooting them whenever you can. As you guessed...once a few levels have passed, it should appear. You'll be presented with a "bonus level" that gives you the opportunity to score a huge amount of points (once you see it, you'll know why).

#34 Deteacher OFFLINE  

Deteacher

    River Patroller

  • 2,287 posts
  • Location:Newark, DE

Posted Sat Oct 9, 2010 8:09 PM

I scored over 10K when I hit level 4 and I didn't trigger the Easter Egg. I'm guessing you have to hit every alien when they charge in order to trigger the easter egg. I'll try again later. :)

#35 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,458 posts
  • Location:The land of Gorch

Posted Sun Oct 10, 2010 6:18 AM

"Four" plays a role in 3 different things in order to trigger the bonus level. The number of waves passed is only one of those things.

#36 Bakasama ONLINE  

Bakasama

    Stargunner

  • 1,099 posts
  • Moldova does it again.

Posted Sun Oct 10, 2010 10:43 AM

View PostNukey Shay, on Wed Sep 29, 2010 4:19 PM, said:

...just score well.

Oh, I think doing that is a little bit harder than figuring out how to do that.

#37 ravenxau OFFLINE  

ravenxau

    Space Invader

  • 39 posts
  • Location:australia

Posted Sun Dec 12, 2010 3:30 AM

View PostNukey Shay, on Sun Oct 10, 2010 6:18 AM, said:

"Four" plays a role in 3 different things in order to trigger the bonus level. The number of waves passed is only one of those things.

I'm guessing having 4 men (passing 7000) will be one of them.

#38 ravenxau OFFLINE  

ravenxau

    Space Invader

  • 39 posts
  • Location:australia

Posted Mon Dec 13, 2010 3:48 PM

Ok - passed the 4th level with 4 ships intact and nothing - mabey the third 4 is 4 zero's (score over 10,000) - should be do-able, just need a keen trigger finger!!!!

#39 Brian O ONLINE  

Brian O

    Stargunner

  • 1,096 posts
  • [Custom Status Placeholder]

Posted Mon Dec 13, 2010 3:56 PM

Nice job on this :thumbsup:

#40 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,458 posts
  • Location:The land of Gorch

Posted Tue Dec 14, 2010 10:13 PM

View Postravenxau, on Mon Dec 13, 2010 3:48 PM, said:

Ok - passed the 4th level with 4 ships intact and nothing - mabey the third 4 is 4 zero's (score over 10,000) - should be do-able, just need a keen trigger finger!!!!

This was beginning to sound strange, so I double-checked the routine. It was BROKEN. The way it was supposed to work is by ANDing bit 4 of the middle score variable (i.e. hundredths-digit = 4, 5, 6, or 7) with the number of ships and the wave number. Unfortunately, the number of ships refers to the number of reserve ships...so you would not see the bonus wave until the score had rolled at least once...to hit 7k a second time and award the next one!

Fixed version posted up top

#41 TrekMD ONLINE  

TrekMD

    Stargunner

  • 1,542 posts
  • Location:Coral Gables, FL

Posted Wed Dec 15, 2010 12:14 AM

To quote a certain Lord: Impressive, most impressive. ;)

#42 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,458 posts
  • Location:The land of Gorch

Posted Thu Dec 16, 2010 7:25 AM

"4" is used a few ways to uncover the secret in Hack'Em and Ms.Hack, too...such as the board counter (counting from 0, 4 = first apple board). It doesn't rely on specific score digit values, tho...which might make things easier.

#43 espire8 OFFLINE  

espire8

    Dragonstomper

  • 625 posts

Posted Sat Nov 19, 2011 10:21 AM

Hi Nukey. I just stummbled onto this old thread. Get hack! I love it!

I was also looking into the issue you mentioned of the flagship and thought I would try to see if I could try some pixel alterations that might help.

Meanwhile, as a hack request, can you have the ship double-sized along with the missile width too? I prefer the narrow shots with the normal ship on "B" difficulty and wide shots and wide ship on "A". Makes a neat trade-off for using wide shots on the enemies while becoming a bigger target as well, like it is done in atari space invaders.

#44 ls650 OFFLINE  

ls650

    River Patroller

  • 4,484 posts
  • Atari rocks!
  • Location:British Columbia

Posted Sat Nov 19, 2011 11:45 PM

I had not seen this hack before. I just gave it a try... very nice effort!

#45 Allpaul OFFLINE  

Allpaul

    Chopper Commander

  • 140 posts
  • Location:Nashville,TN

Posted Tue Nov 22, 2011 12:18 AM

Holy crap! Nice job!

#46 DeusVult OFFLINE  

DeusVult

    Space Invader

  • 30 posts
  • Location:Mountains of NC

Posted Sun May 13, 2012 10:30 PM

Just tried this out. (It's my favorite 2600 title) Appreciate the work you did. I enjoyed the changes; looks a lot better.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users