Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - What are you working on?

Reply to topic
Author Message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
What are you working on?
Post Posted: Tue Nov 25, 2014 9:36 pm
Sorry if this has been done in another thread, I think I might have seen it, but what are you working on?

As a newbie to SMS dev, I'm working on a Tetris game. Sigh. I know, i'm embarrassed by it because it seems so lazy, Tetris has been done to death. I thought back to my college days in 1993 when I wrote a Tetris game for VGA text mode in Turbo Pascal. It took advantage of the software font of the VGA text mode, which is a bit like tiles and quite like the Spectrum. I really enjoyed writing that, it even had basic SFX using the OPL3 on the Sound Blaster and my classmates enjoyed playing it.

So far....I haven't got so far. I've got a splash screen that waits for user input, then I have a basic interrupt routine that works on vsync that runs a set of 8 timers. Those timers can be be programmed so that when they reach zero they set a flag for each timer. I figured they would be useful for timing the events in my game for things like sound effects. I have done some tiles for "bricks" and some routines to fill the screen with various tiles, and some tile "maps" for the tetromino shapes which I have now got displayed on screen. I also wrote a crappy routine that displays a 6 digit score value based on BCD digits and a routine to add up the score in BCD.

I also have some routines doing some basic playing of the PSG.

Just this bit has already taken me days of work since writing a "hello, world" from Maxim's getting started doc. I'm always jealous of these guys that knock up something amazing in a week.

So I feel like I've made not so much progress but at the same time it feels like some things are starting to come together. I've got some framework routines for doing general stuff and so over the next few days I plan on extending them, and also writing the psuedo code for the core logic of the game. My aim is to have the tetromino shown as a series of sprites when it is in motion and then written into the nametable once it "lands". I know that is probably an overly complex way of doing it, but I have never coded for a system that has sprites before and wanted a chance to use them. In all reality it will take me weeks or months before I get this released.

Anyway, wanted to thank Maxim for even getting this far, because over the years I would read the tech docs for some game console, dream up something, but never get beyond that because I would find I was getting all torn up getting the assembler to work or how to make the magic numbers for the console to be happy. Maxim's getting started doc really took all the pain out of that so that I had the software and the "magic" out of the way to get coding. Really grateful for that start, because all my past attempts never got past the starting post!

I'm really enjoying the SMS and coding for it, its a buzz every time I get a routine to do what I want (and I've had to make massive use of Meka's debugger to get that far). You make mistake after mistake, and have to run through it in the debugger till you realise what a massive fail you made. Then you fix it and it works and you're on top of the world!
  View user's profile Send private message
  • Joined: 14 Apr 2013
  • Posts: 624
Reply with quote
Post Posted: Tue Nov 25, 2014 10:04 pm
tripledonkey wrote
My aim is to have the tetromino shown as a series of sprites when it is in motion and then written into the nametable once it "lands". I know that is probably an overly complex way of doing it, but I have never coded for a system that has sprites before and wanted a chance to use them. In all reality it will take me weeks or months before I get this released.

Tetris on GameBoy does it the same way. The falling block is a sprite until it hits the ground. Also the preview block is a sprite in that version. Everything else is nametable.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 874
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Wed Nov 26, 2014 12:12 am
Well, I intend to make an editor to allow non-technical people to make simple games for retro platforms. Blockly-Z80 is just the first step. ;)
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 877
Reply with quote
Post Posted: Wed Nov 26, 2014 8:00 am
tripledonkey wrote
As a newbie to SMS dev, I'm working on a Tetris game. Sigh. I know, i'm embarrassed by it because it seems so lazy, Tetris has been done to death.

I don't think it's lazy at all. There's no need to be embarassed. Tetris is a very good first project, imo. You know how it's supposed to work, so all you have to do is convince the hardware to act accordingly.

I'm still working on my SMS conversion of the classic 8-bit homecomputer game Bruce Lee. In hindsight, I should have picked an easier project for my first steps into assembly language in general and programming the SMS in particular. I don't know, maybe something like Tetris. ;)

I'm determined to finish it, though, and it's coming along quite nicely. I feel like I've really hit my stride. At this point in time the engine is about 90% done, and the content is slowly nearing the 50% mark. At the moment I'm pondering if occasional slowdown spikes, which only rarely occur in one or two very busy rooms, bother me enough to make me consider rewriting the whole thing with the frame rate knocked down to 30 fps.
  View user's profile Send private message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Wed Nov 26, 2014 8:00 am
Calindro wrote

Tetris on GameBoy does it the same way. The falling block is a sprite until it hits the ground. Also the preview block is a sprite in that version. Everything else is nametable.


Well that is good to know! :)
  View user's profile Send private message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Wed Nov 26, 2014 8:13 am
Kagesan wrote

I don't think it's lazy at all. There's no need to be embarassed. Tetris is a very good first project, imo.


Thanks for the encouragement!

Quote

I'm still working on my SMS conversion of the classic 8-bit homecomputer game Bruce Lee.


I saw that in the home brew section and I had kittens cos I loved that game as a kid on the ZX Spectrum. Will be great when you have it finished, From what I have seen so far it is done to a very high standard.

Quote
At the moment I'm pondering if occasional slowdown spikes, which only rarely occur in one or two very busy rooms, bother me enough to make me consider rewriting the whole thing with the frame rate knocked down to 30 fps.


I presume you've done whatever optimisations you can think of to ease the slowdowns? Would be a shame if you have to chop the frame rate.
  View user's profile Send private message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Wed Nov 26, 2014 8:15 am
haroldoop wrote
Well, I intend to make an editor to allow non-technical people to make simple games for retro platforms. Blockly-Z80 is just the first step. ;)


You know, generally I'm skeptical of graphical programming languages, but seeing that turn it into z80 code in front of my eyes.... just WOW!

Great work.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3827
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed Nov 26, 2014 9:15 am
tripledonkey wrote
I'm always jealous of these guys that knock up something amazing in a week.


I'm not sure they really exist. Maybe it's me, but even if I come from previous homebrew experience, I feel I'm just starting to get things correctly now about the Z80/SMS after one year I spend my time around here...

Tetris could be very nice, what's wrong with it? :D
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Wed Nov 26, 2014 9:21 am
As much as people deride Tetris homebrew, there is only one (so far) for the Sega 8-bit systems, and it's not really complete, so there's plenty of room for a polished version.

I suggest you try to implement some of the variations on the rules, as the modern Tetris Company rules actually spoil the game a bit. If you can port the RNG from the Game Boy version, that would be awesome :) Also, Invisible Tetris would be cool.

Also, you might want to target next year's coding competition - March 27th is the deadline.

Most of my recent efforts have been done in under a week, but it probably shows.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 611
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Wed Nov 26, 2014 6:40 pm
Welcome on board tripledonkey! :)

I was working on my first homebrew Knights of the Square (aka. Blockquest). Then I felt like taking a little pause from software to do an RGB mod to the console, and now everything is a mess of wires... But I will eventually prevail!
  View user's profile Send private message Visit poster's website
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Wed Nov 26, 2014 8:33 pm
sverx wrote
I'm not sure they really exist. Maybe it's me, but even if I come from previous homebrew experience, I feel I'm just starting to get things correctly now about the Z80/SMS after one year I spend my time around here...


Well, I'm comforted by that. I first completed the Maxim tutorial a long while back, but then I lost the computer it was on and gave up. Then in the last few weeks I set it up again, and then joined the forum, and I've been making a PDF version of Charles' VDP documentation (I got in touch with Karl Guttag for that, and he responded which was ace!), and I thought I will try properly for Tetris. My game is called NYETRIS.

Quote
Tetris could be very nice, what's wrong with it? :D

Just, I'm aware that the system lacked games and it seems a shame to be doing one when there is already a good version of it lying around. But I chose it because a) I have done it before in Pascal on a 286, and b) cos it seemed achievable.

Because of the encouragement from you guys, I got into a theme for it today, which is of it being a Russian game made for an SMS clone, only the game claims it is SEGA which is the Western devil copy! I redefined the Namco font with a backwards R and use deep red text like on those Russian computers... corny I know! You guys are already in the credits!

I'm setting things out as tiny milestones to reach, and I'm on about milestone 5. It will likely be about milestone 32 before I'm near complete.

The things I want to spend my time on the most next are using the timers I setup in vblank for things like PSG sound effects and timing of the dropping tetrominoes and "key-repeat". Collision detection is also going to be fun (not). As I remember, in my Pascal game, it would try to execute the move, check for collisions and then only really do it if it were possible (or if the collision meant the tetromino had come to rest). It didn't have a "wall kick" mechanism or anything.

I recall the collision detection as being some of the hardest code. Not that it is hard, but it was hard to me!

I'd like to get music in it too, but I have very little knowledge on that so far. My girlfriend is a musician, so she may be able to help me with an original tune, at least that is what I am hoping!
  View user's profile Send private message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Wed Nov 26, 2014 8:43 pm
Maxim wrote
As much as people deride Tetris homebrew, there is only one (so far) for the Sega 8-bit systems, and it's not really complete, so there's plenty of room for a polished version.


I've been looking at the Tetris Wikia which is awesome so trying to derive some inspiration from that.

Quote

If you can port the RNG from the Game Boy version, that would be awesome :)


I will check into that. What is special about it? I remember the RNG driving me bats on the original version I wrote, and I must not be alone because a friend wrote this:

"Writing a Tetris clone is the final proof of the existence of god.

When you play Tetris, you always get in a position where you are in
dire need of a specific-shaped piece, and then the game proceeds to
not give it to you for a duration far in excess of that allowed by
chance. So you conclude the game-writer has written code to detect
this situation and be evil to you.

When you write your own Tetris clone, your clone still behaves this
way, despite the fact that you know for a 100% certainty that you
did not write any such evil code. Thus the only possibility remaining
is that something external to the code is being evil to you, exerting
a supernatural influence on your game. Therefore, god exists, and is
a git. QED."

Quote

Also, you might want to target next year's coding competition - March 27th is the deadline.


Cool! That gives me something to aim for!
  View user's profile Send private message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Wed Nov 26, 2014 8:47 pm
hang-on wrote
Welcome on board tripledonkey! :)

I was working on my first homebrew Knights of the Square (aka. Blockquest). Then I felt like taking a little pause from software to do an RGB mod to the console, and now everything is a mess of wires... But I will eventually prevail!


Thanks for the encouragement. I've been trying to set up a little electronics lab and get back into it, and playing with arduino,so I can appreciate the hardware hacking even if I'm making very little headway myself.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Wed Nov 26, 2014 9:12 pm
Welcome!
Tetris is one of my all-time favorite and a great way to get started. There's nothing to be ashamed of, you'll find that actually polishing and releasing a quality game is hard enough that you don't want to aim for something crazy. Would be awesome to have a Tetris for SMS that's as polished as say, Columns. With fluid movements, two players mode.. the sky's the limit so even there you'll see you can find challenge :) I'm daydreaming here..

I haven't worked on SMS game for a while (since KunKun 2). Recently spent some time reverse engineering Wonder Boy III as a side-project.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Thu Nov 27, 2014 9:32 am
For Tetris information overload, I recommend http://tetrisconcept.net
  View user's profile Send private message Visit poster's website
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Fri Nov 28, 2014 4:15 pm
Bock wrote
Welcome!
Tetris is one of my all-time favorite and a great way to get started. There's nothing to be ashamed of, you'll find that actually polishing and releasing a quality game is hard enough that you don't want to aim for something crazy. Would be awesome to have a Tetris for SMS that's as polished as say, Columns. With fluid movements, two players mode.. the sky's the limit so even there you'll see you can find challenge :) I'm daydreaming here..


I have considered 2-player mode, but first of all I have to get 1 player mode working.

How do you define fluid movement? I'm not so keen on moving the sprite at anything less than 8 pixels. I prefer it to snap to where it is going it feels more precise and is quicker to move the sprite.

You're right, there is plenty of challenge, however I'm not sure I'm up to all the advanced features in the first pass. This is probably the largest (and I realise its not large in the scheme of things) assembler program I've ever written. In my past I've used assembler (8086, 68000, 6502) but it was typically for tiny routines - core loops and interrupt routines - that sort of thing. I'd be embarrassed to show my code at this point as its likely horrendous!

While I don't want to release a flawed game, at the same time I don't want to get to the point where its never released cause I'm always adding just one more feature. I'll be very pleased with myself if I just get the basic game running in a way is playable and enjoyable. I can then focus on getting it polished and extra features, so I see there might be the need to release it as two games Nyetris 1, and Nyetris 2.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Fri Nov 28, 2014 4:27 pm
Everybody's Z80 code is horrendous, don't worry about that ;)
You are right that the movement of the bricks don't necessary needs to be per-pixel. I meant fluid more as in a general "game feels reactive". Some of unlicensed clones are particularly bad in term of feeling good.

Keep up posted with your progress! Releasing anything even early in development is a very formative thing.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Dec 2004
  • Posts: 43
  • Location: UK
Reply with quote
Post Posted: Fri Nov 28, 2014 4:56 pm
There is a nice version of Tetris for the System E Arcade Hardware which is based on the SEGA Master System.

http://www.system16.com/hardware.php?id=704

Could be a good reference point for anyone developing their own version of Tetris and what it can potentially look like.
  View user's profile Send private message
  • Joined: 23 Jan 2010
  • Posts: 437
Reply with quote
Post Posted: Fri Nov 28, 2014 5:32 pm
Cool this "Riddle of Pythagoras"!
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Fri Nov 28, 2014 6:58 pm
For fluid movement, consider the motion in Puyo Puyo - falling is pixel-wise, but left/right movement is block-wise. However, I think that might not work well for Tetris.

More important is to have reactiveness to controls. For my "ono" shooter, I spent a large chunk of time on the player object movement, to get it from "Alf" to "Sonic" levels of refinement. For Tetris, things are slightly different well-calibrated auto-repeat delays and rates, lock-on times, etc will have a big effect on the feel of the game. The player needs to learn to trust that the game will do what he expects when he moves the block. The availability of actual numbers for these parameters might help :)
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 3827
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Fri Nov 28, 2014 8:10 pm
Bock wrote
Everybody's Z80 code is horrendous


I can confirm that. No matter how hard I try, code always becomes messy or cumbersome. I suspect it's Z80 own instruction set to blame.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Fri Nov 28, 2014 9:32 pm
I disagree, Z80 code is very readable to me, almost poetic... whereas 6502 style assembly is like reading raw hex, very impenetrable.
  View user's profile Send private message Visit poster's website
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Fri Nov 28, 2014 11:42 pm
Z80 is beautiful ~~~~
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 877
Reply with quote
Post Posted: Sat Nov 29, 2014 8:17 am
sverx wrote
Bock wrote
Everybody's Z80 code is horrendous


I can confirm that. No matter how hard I try, code always becomes messy or cumbersome. I suspect it's Z80 own instruction set to blame.

Seconded.

Although I have to agree with Maxim that Z80 asm is quite readable, it seems like every piece of code I write that starts out well-planned and structured inevitably ends up as a tangled mess. I blame the programmer, not the instruction set, though.
  View user's profile Send private message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Sat Nov 29, 2014 9:15 am
I kind of like the z80 now but the asymmetry drives you a bit nuts sometimes. I agree with you guys on the need for reactiveness and timing of the repeats and lock in. Some play testing when the time comes would be helpful.

The system e thing is useful. Thanks for that. Does MAME have good debugging? I haven't used it in a long time.

Thanks for the interest and support i'll keep you posted as I go along.
  View user's profile Send private message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Sat Nov 29, 2014 9:20 am
Maxim wrote
I disagree, Z80 code is very readable to me, almost poetic... whereas 6502 style assembly is like reading raw hex, very impenetrable.


My memories of the 6502 were coding it in pure hex at college on an EMMA II board...it was hell!
  View user's profile Send private message
  • Joined: 08 Dec 2005
  • Posts: 488
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Sat Nov 29, 2014 12:06 pm
Maxim wrote
I disagree, Z80 code is very readable to me, almost poetic... whereas 6502 style assembly is like reading raw hex, very impenetrable.

I do not find 6502 assembly to be impenetrable, but it certainly can be harder to follow than Z80. It requires thinking at a lower level - I once heard this expressed as:

Quote
The 6502 has 256 registers [zero page], but you have to program in microcode.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 3827
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Sat Nov 29, 2014 12:59 pm
Kagesan wrote
I blame the programmer, not the instruction set, though.


I blame both. But I understand that the quirks with the instruction set are mainly coming from Intel 8080.
  View user's profile Send private message Visit poster's website
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Sun Nov 30, 2014 1:31 pm
Whitesnake wrote
There is a nice version of Tetris for the System E Arcade Hardware which is based on the SEGA Master System.

http://www.system16.com/hardware.php?id=704

Could be a good reference point for anyone developing their own version of Tetris and what it can potentially look like.


It seems like Super Tetris on the SMS is based on this - the cart even includes the tiles "INSERT COIN" haha. I haven't played the arcade version but Super Tetris on the SMS isn't all that good so I now feel less bothered by writing a tetris game as it seems the SMS is in need of a good tetris.

Problem I have with Super Tetris right of the bat is only one way rotate, there is a slight delay before you can move after your piece spawns, and the difficultly level shoots up out of nowhere - I think this related to it being arcade based - arcade games tend to want you think you're doing OK for a while and then get difficult enough to either throw you off the machine (for someone else to play) or get you to pump another coin in.
  View user's profile Send private message
  • Joined: 23 Jan 2010
  • Posts: 437
Reply with quote
Post Posted: Sun Nov 30, 2014 1:50 pm
I guessed a nes homebrew very interesting.
"Zooming secretary" have a cool gameplay concept.
  View user's profile Send private message
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Mon Dec 01, 2014 9:14 am
Maxim wrote
I disagree, Z80 code is very readable to me, almost poetic... whereas 6502 style assembly is like reading raw hex, very impenetrable.


I agree. At first I had hard times reading others Z80 code but after some good practice it will be very easy to read what the programmer was thinking and how the code works.
I'm really fond of the Z80 and its limitations.

For 6502.. I am still a beginner and its still hard to read code. Probably due all the index-es and LUT's which are used often.
  View user's profile Send private message
  • Joined: 08 Nov 2014
  • Posts: 92
Reply with quote
Post Posted: Wed Dec 10, 2014 6:32 pm
Been slacking severely. Only just done updates today. I did the random generation of the tetrominoes and played about with sprites a bit. Fixed a bug in my interrupt routine. Still bucket loads to do.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!