SABS Forum

Public => Creation => Topic started by: RT-55J on Thu, 2025 - 02 - 06, 11:10 PM

Title: SMS Homebrew Project
Post by: RT-55J on Thu, 2025 - 02 - 06, 11:10 PM
The provisional title of this project is Samantha Arantes vs Karid-X and Other Bounty Hunting Tales. I'll edit the title to be less generic once I actually have some stuff to show. :)

This is the goal (as seen in the pixel art topic):

(https://forum.samarantes.net/index.php?action=dlattach;attach=77;image)

(Any resemblances to Barbuta are entirely intentional.)

Currently I just got the Hello World program provided in Maxim's tutorial (https://www.smspower.org/maxim/HowToProgram/Index) working. It was kind of annoying, because the provided .bat file refused to work until I removed the space from the "Hello World.asm" filename.

I'll probably make a short demo (i.e. display an image and respond to input) in ASM before testing out the C toolchain.

I want to have something playable by October.
Title: Re: SMS Homebrew Project
Post by: RT-55J on Sat, 2025 - 02 - 08, 08:32 PM
I did some work on the Hello World tutorial to see if I could get it to display my avatar.

My immediate goal here is to write a nice little scroller demo.

Pictured:
1) "Hello world!" but with the font overwritten
2) "Hello world!" but with the avatar tilemap accidentally being a copy of the tileset
3) "Hello world!" but without a specified width for avatar tilemap
4) "Hello world!" but with the incorrect width for the avatar tilemap (off by one)

(continued in the next post)
Title: Re: SMS Homebrew Project
Post by: RT-55J on Sat, 2025 - 02 - 08, 08:35 PM
5) "Hello world!" with the avatar in place, but with some mystery junk in the top-left corner...
6) "Hello world!" but with those garbage sprites moved offscreen.

Now that's more like it.

(Thanks to BachelorSoft for his wonderful pixelwork.)
Title: Re: SMS Homebrew Project
Post by: neen on Sat, 2025 - 02 - 08, 09:03 PM
nice! i should make a thread for mine, too. it's been a wild few days.

i look forward to seeing how many different problems we both run into
Title: Re: SMS Homebrew Project
Post by: neen on Sat, 2025 - 02 - 08, 09:45 PM
i was thinking of streaming stuff, but today was completely obliterated by my own dumbness.

have you considered streaming dev stuff? i am fascinated and afraid of z80 and master system hardware but i would totally watch
Title: Re: SMS Homebrew Project
Post by: RT-55J on Sat, 2025 - 02 - 08, 09:58 PM
I've thought about streaming devwork just as a means of staying focused and not being distracted by Discord or some nonsense every 5 seconds.

Getting to the point where my browser/desktop looks presentable is a bit of a daunting task though.
Title: Re: SMS Homebrew Project
Post by: RT-55J on Sun, 2025 - 02 - 09, 09:48 PM
I didn't do any work on this today besides making a repository (https://github.com/alex-west/SMS-test-program-asm), because I just know I'll want one sooner or later.
Title: Re: SMS Homebrew Project
Post by: RT-55J on Tue, 2025 - 02 - 11, 05:41 PM
Switched from Mesen to Emulicious, because I couldn't find the option in Mesen to display borders (This is Important).

I made a basic VBlank handler that transfers the sprite table from a copy in WRAM to their canonical location in VRAM. There's no visual difference here, but it's progress to a sprite engine, I guess. I'm not sure how performant it is, but it seems okay.

Also I noticed that I accidentally had my avatar one tile to low. This has been fixed.

(Also also, I accidentally posted this in neen's thread last night oopsie daisy.)
Title: Re: SMS Homebrew Project
Post by: neen on Tue, 2025 - 02 - 11, 08:51 PM
rt is on sprites already, i think he's ahead  :smug:

Title: Re: SMS Homebrew Project
Post by: RT-55J on Fri, 2025 - 02 - 14, 03:41 PM
Input is being read and the playfield is being scrolled.

Also I discovered that I have to enable the "mask the right 8 pixels of the screen" register if I want to have things scroll horizontally :mad:
Title: Re: SMS Homebrew Project
Post by: RT-55J on Fri, 2025 - 02 - 14, 06:17 PM
Decided to port over another piece of art I commissioned from Bachelor Soft. (This one had some more out of gamut colors that I needed to finagle.)

The goal now will be to switch between these two at runtime.
Title: Re: SMS Homebrew Project
Post by: neen on Fri, 2025 - 02 - 14, 10:26 PM
it was definitely a background kind of week, for both of us, for sure
Title: Re: SMS Homebrew Project
Post by: RT-55J on Sat, 2025 - 02 - 15, 12:29 AM
Refactored some stuff to be not hardcoded.

Picture A is the result when I mess up some pointer arithmetic. Picture B is the result when I forget to convert the width from tiles to bytes.

And picture C shows a little embellishment I added for spice.

Now to sleep...
Title: Re: SMS Homebrew Project
Post by: RT-55J on Sat, 2025 - 02 - 15, 08:01 PM
Some progress!

Picture 1 shows "Hello World!" 4 times. I swear they're all different under the hood!

Picture 2 shows an early attempt at drawing characters one at a time. I forgot to increment the text pointer after reading a character (also, it was really slow because I wasn't resetting the timer (oops)).

Picture 3 is where I'm at now. It's beautiful.

I feel like I'm, like halfway to a cracktro at this point.
Title: Re: SMS Homebrew Project
Post by: neen on Sun, 2025 - 02 - 16, 08:52 PM
even if you stopped now you could still make a visual novel :smug:
Title: Re: SMS Homebrew Project
Post by: neen on Sun, 2025 - 02 - 16, 09:44 PM
i expect to see a polished game by octrollber  :hey:
Title: Re: SMS Homebrew Project
Post by: RT-55J on Mon, 2025 - 02 - 17, 08:22 AM
That's the hope! :smug:
Title: Re: SMS Homebrew Project
Post by: RT-55J on Tue, 2025 - 02 - 18, 11:24 PM
I got interrupts working! (kinda*)

* The SMS has a "line counter" register that tells the display processor how many lines to wait until the next raster interrupt. Writes to this register during VBlank go through immediately. Writes to this register during the active display are latched (i.e. delayed) until the next interrupt fires. This presents some complications that I'll need to find a workaround for if I want to have multiple** raster interrupts active.

** It may look like I have two splits here, but don't be fooled. The SMS has a register that can just lock the upper two rows in place, with no extra effort to the programmer.
Title: Re: SMS Homebrew Project
Post by: neen on Tue, 2025 - 02 - 18, 11:27 PM
wow look at it go :smug: