Master System Alf question
-
strat
- Posts: 411
- Joined: Mon Apr 07, 2008 6:08 pm
- Location: Missouri
Master System Alf question
http://cinemassacre.com/2014/12/12/alf- ... game-nerd/
"But why is it that everytime Alf turns around he disappears for a brief instant"
Is that because the SMS doesn't have sprite flipping, so the animation frames of Alf facing the other way are being written to vram? That's some sloppy programming if so.
"But why is it that everytime Alf turns around he disappears for a brief instant"
Is that because the SMS doesn't have sprite flipping, so the animation frames of Alf facing the other way are being written to vram? That's some sloppy programming if so.
-
koitsu
- Posts: 4201
- Joined: Sun Sep 19, 2004 9:28 pm
- Location: A world gone mad
Re: Master System Alf question
Here's the Youtube version for those who prefer that source: https://www.youtube.com/watch?v=TCcB0iUvU_Y
There are plenty of SMS games (ex. Golvellius, Shinobi) where the SMS's lack of sprite X/Y flip capability doesn't hinder the experience in any way when changing the direction the player is facing, so my guess is that it's just sloppy/lazy coding compounded with running out of tile space. Someone would need to actually run the thing under a decent emulator (read: one with good debugging capability) to see if that's the case.
Either way, Alf ideally shouldn't "blink", and especially for how long he does: multiple frames, and I'd guess 2-4 from the look of it (does the SMS use 240p like the NES?). It's not even something like sprite rotation (like what's commonly used on the NES to "overcome" the 8-per-scanline limitation).
We've discussed the SMS's lack of sprite flip capability before: viewtopic.php?f=2&t=5850 -- tokumaru has some good insights there.
That game is pretty horrible in general though -- you can't see it from the AVGN video, but the music slows down during areas where there's a lot of processing going on (probably someone having to skip frames because of doing too much outside of NMI) -- see around 1:27 or so -- https://www.youtube.com/watch?v=Ox8aKg4XElc . And be sure to watch around 2:10 or so: the divers attacking Alf, as well as Alf himself, flip vertically without any flicker. The same, but horizontally, when he's in space (see ~5:50). Both space and the underwater parts have significantly less graphics on-screen, so that would support my "they ran out of tile space and are having to copy lots of data around in RAM and back" theory. (Or maybe even from ROM, but then we get into pondering how much ROM space was available vs. how much the company wanted to spend, and if they used software compression).
And the ending is so disappointing and awful for such a painful game. Ha! I kill me!
Footnote, probably unrelated: I still think it's super weird how on the SMS there's 64 bytes of unused (or "undocumented") data in the middle of the sprite attribute table, especially since the table is only 256 bytes to begin with. One doc even says "use it for whatever you want!" and I'm just like "?!?!?!?!?!"
There are plenty of SMS games (ex. Golvellius, Shinobi) where the SMS's lack of sprite X/Y flip capability doesn't hinder the experience in any way when changing the direction the player is facing, so my guess is that it's just sloppy/lazy coding compounded with running out of tile space. Someone would need to actually run the thing under a decent emulator (read: one with good debugging capability) to see if that's the case.
Either way, Alf ideally shouldn't "blink", and especially for how long he does: multiple frames, and I'd guess 2-4 from the look of it (does the SMS use 240p like the NES?). It's not even something like sprite rotation (like what's commonly used on the NES to "overcome" the 8-per-scanline limitation).
We've discussed the SMS's lack of sprite flip capability before: viewtopic.php?f=2&t=5850 -- tokumaru has some good insights there.
That game is pretty horrible in general though -- you can't see it from the AVGN video, but the music slows down during areas where there's a lot of processing going on (probably someone having to skip frames because of doing too much outside of NMI) -- see around 1:27 or so -- https://www.youtube.com/watch?v=Ox8aKg4XElc . And be sure to watch around 2:10 or so: the divers attacking Alf, as well as Alf himself, flip vertically without any flicker. The same, but horizontally, when he's in space (see ~5:50). Both space and the underwater parts have significantly less graphics on-screen, so that would support my "they ran out of tile space and are having to copy lots of data around in RAM and back" theory. (Or maybe even from ROM, but then we get into pondering how much ROM space was available vs. how much the company wanted to spend, and if they used software compression).
And the ending is so disappointing and awful for such a painful game. Ha! I kill me!
Footnote, probably unrelated: I still think it's super weird how on the SMS there's 64 bytes of unused (or "undocumented") data in the middle of the sprite attribute table, especially since the table is only 256 bytes to begin with. One doc even says "use it for whatever you want!" and I'm just like "?!?!?!?!?!"
-
ccovell
- Posts: 1045
- Joined: Sun Mar 19, 2006 9:44 pm
- Location: Japan
Re: Master System Alf question
Yeah, the SMS is bonkers. No sprite flipping and no mid-field vertical scroll writing (meaning driving games can't have smooth hills.)
And ALF...... programmed in Borland Pascal by programmers weaned on the PC-XT, mayhaps?
And ALF...... programmed in Borland Pascal by programmers weaned on the PC-XT, mayhaps?
-
tokumaru
- Posts: 12668
- Joined: Sat Feb 12, 2005 9:43 pm
- Location: Rio de Janeiro - Brazil
Re: Master System Alf question
Meka has great debug tools. Use the tile viewer to see what happens when you turn left and right. I would guess that the long pause is the result of loading tiles for several frames of animation, instead of only the frame that will be used next. With many animation frames loaded at the same time, there isn't enough space to double buffer sprites and prevent glitches (or, in this case, disappearance). Most Master System games prefer to double buffer the main character and constantly load new animation frames. Enemies, however, don't usually have as many animation frames, so they're still loaded in complete sets (which would explain enemies in ALF not displaying the same issues as the title character).
-
tepples
- Posts: 22993
- Joined: Sun Sep 19, 2004 11:12 pm
- Location: NE Indiana, USA (NTSC)
Re: Master System Alf question
Do any notable Master System games use sprite scaling? The obvious solution for SMS flipping (a bit reverse lookup table) could do scaling (a bit deletion lookup table) with very little overhead, as seen here where I scale a 32x48 sprite at 15 fps on an NES.
-
Dwedit
- Posts: 5257
- Joined: Fri Nov 19, 2004 7:35 pm
Re: Master System Alf question
The most notorious part of Alf on Sega Master System is what happens if you buy the Alf Book item.
The item's description says "This will take you back".
When you use the item, it shows you some backstory, then the game restarts. Get it? "Takes you Back!"
The item's description says "This will take you back".
When you use the item, it shows you some backstory, then the game restarts. Get it? "Takes you Back!"
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
-
tokumaru
- Posts: 12668
- Joined: Sat Feb 12, 2005 9:43 pm
- Location: Rio de Janeiro - Brazil
Re: Master System Alf question
Well, Earthworm Jim uses the VDP's capability of scaling all sprites by 2x to draw it status bar, but that's probably not the type of scaling you're talking about! =)tepples wrote:Do any notable Master System games use sprite scaling?
Racing games with a 3D perspective (such as Road Rash) are the most obvious candidates for real time sprite scaling.
-
koitsu
- Posts: 4201
- Joined: Sun Sep 19, 2004 9:28 pm
- Location: A world gone mad
Re: Master System Alf question
This made my morning. You're awesome, Dwedit.Dwedit wrote:The most notorious part of Alf on Sega Master System is what happens if you buy the Alf Book item.
The item's description says "This will take you back".
When you use the item, it shows you some backstory, then the game restarts. Get it? "Takes you Back!"
-
Sik
- Posts: 1589
- Joined: Thu Aug 12, 2010 3:43 am
Re: Master System Alf question
It has the Takeshi's Challenge theme. Do you seriously need to know more? (・・ )
Also apparently yes, some enemies trigger the blinking too. Worse, it seems like it can happen fullscreen (i.e. every sprite gets wiped off the screen). And there's tearing on Alf's sprite sometimes (as if his tiles didn't align up). I think it'll be better to not try to understand what's going on, sounds like it would melt many brains in the process =P
Also apparently yes, some enemies trigger the blinking too. Worse, it seems like it can happen fullscreen (i.e. every sprite gets wiped off the screen). And there's tearing on Alf's sprite sometimes (as if his tiles didn't align up). I think it'll be better to not try to understand what's going on, sounds like it would melt many brains in the process =P
-
rainwarrior
- Posts: 8764
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
Re: Master System Alf question
...and yet they decided to build the SMS port of Hang-On directly into the system.ccovell wrote:Yeah, the SMS is bonkers. No sprite flipping and no mid-field vertical scroll writing (meaning driving games can't have smooth hills.)
-
Sik
- Posts: 1589
- Joined: Thu Aug 12, 2010 3:43 am
Re: Master System Alf question
...by getting rid of hills. OutRun had hills and it didn't fare well. (Road Rash also had them but they were software rendered, and if it wasn't for the lack of FM support it'd be hard to tell apart from its 16-bit counterpart o_O) The fact that horizontal scrolling was limited to 32 tiles didn't help either (the road would bleed from the sides without an easy way to replace the tiles since it's per-line, Road Rash hides this by wasting sprites, OutRun just shows glitches)
The inability to change vertical scrolling mid-screen is because it keeps track of the current line and advances it by 1 per line (the value in the scroll register is only used for the first line). Actually this would also be a problem with the NES if it wasn't because you can outright override the internal state (IIRC you need a different method to set the scroll value in that case).
The inability to change vertical scrolling mid-screen is because it keeps track of the current line and advances it by 1 per line (the value in the scroll register is only used for the first line). Actually this would also be a problem with the NES if it wasn't because you can outright override the internal state (IIRC you need a different method to set the scroll value in that case).
-
Gilbert
- Posts: 615
- Joined: Sun Dec 12, 2010 10:27 pm
- Location: Hong Kong
Re: Master System Alf question
I think not being able to change vertical position mid-frame is a huge bummer (together with the inability to flip sprites of course) for the SMS. Many games cannot have an informative status bar because of this(especially for games that have vertical scrolling obviously) and have to rely on sprites to display the scores on screen, whereas most of the other information such as remaining number of lives, etc. are missing, forcing players to press PAUSE for vital information. I think some games don't even display the scores in-game at all(Wonder Boy was an example, but at least the necessary health bar was shown). I'm not sure what will happen in a vertically scrolling game if the hardware function of freezing the first row of background tiles is enabled(I think the Window layer of the Mega Drive is a spiritual successor of this) though. As far as I know, while some early games used this function for an easy status bar, most newer games didn't use it, and that it doesn't even work(because that first row of tiles is off the visible display area) for Game Gear games running in the "proper" lower resolution doesn't help.
Still, a "proper" way to have split-screen scrolling without additional hardware(compared to the Famicom where you need to poll sprite 0 hit and/or waste time on cycle counting codes, unless the cartridge's mapper provides another means to doing so; also most of the Famicom games have visible garbages near the screen edges on lines where scrolling is split for... reasons) on the SMS does help. A lot of their games had impressive (at the time) parallax scrolling floor(what will also be used in the arcade game Street Fighter II), especially early games such as Hokuto no Ken and Transbot, which also extended to the Mega Drive versions of Hokuto no Ken (again) and Altered Beast.
Still, a "proper" way to have split-screen scrolling without additional hardware(compared to the Famicom where you need to poll sprite 0 hit and/or waste time on cycle counting codes, unless the cartridge's mapper provides another means to doing so; also most of the Famicom games have visible garbages near the screen edges on lines where scrolling is split for... reasons) on the SMS does help. A lot of their games had impressive (at the time) parallax scrolling floor(what will also be used in the arcade game Street Fighter II), especially early games such as Hokuto no Ken and Transbot, which also extended to the Mega Drive versions of Hokuto no Ken (again) and Altered Beast.
-
tokumaru
- Posts: 12668
- Joined: Sat Feb 12, 2005 9:43 pm
- Location: Rio de Janeiro - Brazil
Re: Master System Alf question
Platformers can usually get away with delayed vertical scrolling in order to have more complete status bars. It worked beautifully for the Mickey Mouse games, which are some of the best in the platform, IMO.Gilbert wrote:I think not being able to change vertical position mid-frame is a huge bummer (together with the inability to flip sprites of course) for the SMS. Many games cannot have an informative status bar because of this(especially for games that have vertical scrolling obviously) and have to rely on sprites to display the scores on screen, whereas most of the other information such as remaining number of lives, etc. are missing, forcing players to press PAUSE for vital information.
Aladdin has some of the best effects I've ever seen in an 8-bit game, completing the parallax effect with 3D walls. This only goes on for the first 2 levels it seems, the rest of the game is much more "normal".A lot of their games had impressive (at the time) parallax scrolling floor(what will also be used in the arcade game Street Fighter II), especially early games such as Hokuto no Ken and Transbot, which also extended to the Mega Drive versions of Hokuto no Ken (again) and Altered Beast.
-
mikejmoffitt
- Posts: 1353
- Joined: Sun May 27, 2012 8:43 pm
Re: Master System Alf question
That's true about not having the mid-screen vertical scrolling, but I thought a certain region of the screen could be defined to be immobile specifically for things like status bars. Am I thinking of a different Sega system? (I am not referring to the Mega Drive's Window layer)tokumaru wrote:Platformers can usually get away with delayed vertical scrolling in order to have more complete status bars. It worked beautifully for the Mickey Mouse games, which are some of the best in the platform, IMO.Gilbert wrote:I think not being able to change vertical position mid-frame is a huge bummer (together with the inability to flip sprites of course) for the SMS. Many games cannot have an informative status bar because of this(especially for games that have vertical scrolling obviously) and have to rely on sprites to display the scores on screen, whereas most of the other information such as remaining number of lives, etc. are missing, forcing players to press PAUSE for vital information.
Aladdin has some of the best effects I've ever seen in an 8-bit game, completing the parallax effect with 3D walls. This only goes on for the first 2 levels it seems, the rest of the game is much more "normal".A lot of their games had impressive (at the time) parallax scrolling floor(what will also be used in the arcade game Street Fighter II), especially early games such as Hokuto no Ken and Transbot, which also extended to the Mega Drive versions of Hokuto no Ken (again) and Altered Beast.
-
tomaitheous
- Posts: 592
- Joined: Thu Aug 28, 2008 1:17 am
Re: Master System Alf question
Yeah, you can define a horizontal piece of the tilemap at the top of the display as none scrolling, to form a window. But IIRC, you can also do this for a vertical 'bar' on the right side as well. No idea how this affects the GG display.
__________________________
http://pcedev.wordpress.com
http://pcedev.wordpress.com