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 - Early Success!!

Reply to topic
Author Message
Consolemu
  • Guest
Reply with quote
Early Success!!
Post Posted: Tue Aug 22, 2000 4:19 pm
I can't believe it! I'm starting to make some progress!! After this morning when I woke up feeling better from the flu I caught, I decided to start coding with Tasm. I wrote a little testing program for the SG1000 that will play a sound if you press up on the joypad. At first I was having trouble compiling it, and later I was having trouble getting it to run in Brsms. So, I look at the pop-up help file for tasm and type

tasm -80 mycode.z80 -g3

instead of

tasm mycode.z80

And it compiled perfectly. Also, instead of using Brsms, I tried using Meka and to my suprise, it worked! I couldn't believe it! When you press up, it will play a tone and when you release up, the sound will stop! It may not seem like much for you all but I think that's pretty cool. Welp, I'm gunna get back to coding and experimenting and see what else I can come up with.

Chris :o)
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Tue Aug 22, 2000 5:48 pm
Quote
> I can't believe it! I'm starting to make some progress!! After this morning when I woke up feeling better from the flu I caught, I decided to start coding with Tasm. I wrote a little testing program for the SG1000 that will play a sound if you press up on the joypad. At first I was having trouble compiling it, and later I was having trouble getting it to run in Brsms. So, I look at the pop-up help file for tasm and type

> tasm -80 mycode.z80 -g3
> instead of
> tasm mycode.z80

Ah, that's something to put in the crash course for SMS programming. I just use the -b option, which I believe does the same thing.
Another thing to do is use -f00 (zeroes) to make sure to fill unused space with zeroes, otherwise I think the default behavior of tasm is to not initialize the unused space, thus it can be anything that was in memory before tasm was run (I've found my own source code embedded in the output binary as ascii before.).
Later on, when your programs get more complex, you'll want to use the -s option to generate a .sym file.
The value of the sym file is that it lets you see the symbol table, so you can know the actual address that cooresponds to any label ion your source file. For instance, you know you want to trace execution in a routine called AddToScore:. So, you compile, check .sym file that tasm outputs, and see the address that AddToScore: ended up being. Start brsms in the debugger, set the breakpoint to the address of AddToScore, and run it until the debugger window comes up.
More good stuff for the tutorial.

Quote
> And it compiled perfectly. Also, instead of using Brsms, I tried using Meka and to my suprise, it worked! I couldn't believe it! When you press up, it will play a tone and when you release up, the sound will stop! It may not seem like much for you all but I think that's pretty cool. Welp, I'm gunna get back to coding and experimenting and see what else I can come up with.

Yeah, my first experiments were definately along those lines, little tone, or changing the screen color in response to pad movement, or putting a little white square in the corner (From which tetris grew). It doesn't sound like much, but it's amazing to see (hear) something you wrote running on the old machine, even if it is emulated.
I'm really quite pleased that you've persued it this far. And I'm sure Zoop will spit coffee, soda, or whatever he drinks all over his screen when he sees a 100% on-topic post from you.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!