Live data from Hacker News

SNES Development Part 1: Getting Started

blog.wesleyac.com

21–30 of 48 posts

Re: SNES Development Part 1: Getting Started

#21
I've developed quite a few SNES-related things for fun, mostly using Go and C++, with some 65816 ASM sprinkled in.

https://github.com/alttpo/alttpo - A Link To The Past Online. Lets multiple players see and interact with one another in the same game world and synchronize their progress through the game. Exclusive to a customized fork of the bsnes emulator which provides a scripting language and PPU-integrated drawing routines to render remote player sprites. In retrospect, I consider this a dead-end architecture; redesigned in o2 project (see below).

https://github.com/alttpo/o2 - Second version of alttpo (see above) but this time targeted at SNES hardware console support (via SD2SNES flash cart USB feature) and does not require a customized emulator nor a scripting language. Trade-off here is a loss of the visual aspect (cannot see remote player sprites) due to tight hardware limitations in the amount of VRAM and limited SNES CPU cycles available. Work is in progress to gain back the remote sprite rendering as an optional add-on via the bsnes-plus WASM module support (see below). This project includes a 65816 machine code emitter library (pure Go) with support for named labels of branch targets. There is also a bare-bones headless SNES emulator library (pure Go) included for unit tests to verify the generated 65816 ASM and ROM patching mechanism.

https://github.com/alttpo/bsnes-plus - A fork of bsnes-plus in development that invokes WebAssembly modules when certain general SNES events occur, e.g. `on_nmi`, `on_power`, `on_reset`, `on_frame_present`. WASM code has access to a draw-list API for drawing into the various PPU layers, e.g. extra sprites, text (with PCF font support), basic shapes. WASM code can also receive arbitrary binary messages from external applications, e.g. to update remote player positions or exchange custom sprite graphics.

Re: SNES Development Part 1: Getting Started

#22
Another fantastic resource (SDK + example codes): https://www.chibiakumas.com/6502/snes.php

And also accompanied by a book: https://www.amazon.com/gp/product/B08W7DWZB3/

It's awesome. Not many new materials dedicated for good old game console programming. BTW, the book also covers Nintendo, Gameboy, Sega, Atari (!!), etc.

Re: SNES Development Part 1: Getting Started

#23
post #21

I've developed quite a few SNES-related things for fun, mostly using Go and C++, with some 65816 ASM sprinkled in. https://github.com/alttpo/alttpo - A Link To The Past Online. Lets multiple players see and interact with one another in the same game world and synchronize their progress through the game. Exclusive to a customized fork of the bsnes emulator which provides a scripting language and PPU-integrated drawing…

Great idea, there are so many games that would actually be played with even a basic co-op support like this. It's okay it's just an overlay with no shared-game state, still really fun!

Re: SNES Development Part 1: Getting Started

#24

I really want to make a retro version of my turn based strategy game Proximity[1] (pretty simple game and I've mostly made a version in Pico-8 already, so it should be doable) for NES, GB, SNES, GBA, and/or something similar, but I'd like to do it with the smallest amount of time and effort necessary (because I really don't have a lot of time anymore). It seems like the new GBDK might be the easiest, especially since…

I can't speak to any of the low code approaches, but I do know it wouldn't be that hard for a GBA implementation once you learned the hardware (and the resources for learning it are pretty good). Each hexagon could be its own sprite (probably even with the text on them already, to make it super trivial), and then you can probably just DMA them into the appropriate place in memory during vblank. So then it's just the…

Yes, out of all the old systems, I think the GBA is the easiest to program for. The design is more streamlined/modern overall so that you don't have to worry about things like bank switching and the GPU has a cleaner design than the SNES.

The BIOS, graphics, and audio firmware fit nicely with the 32bit ARM architecture such that all you have to do is poke data into the right address (usually a #define'ed pointer in C) and it DMAs to the hardware.

And unlike later consoles, there's no operating system or significant copy protection to deal with, you link in a crt0.s to put everything at the right address, load the rom into an emulator, and it will start displaying your game. When your ready, you pop a flashcart into your hardware and it will probably work too. It's all very nice.

Re: SNES Development Part 1: Getting Started

#25

Earlier quoted context omitted.

I generally advise against using bass for home-brew development. Bass is not a very well thought out assembler. I've never used it for 65816, but for other architectures like MIPS has some serious design issues that cause invalid code to be silently accepted by default, which is normally a disaster when it gets to debugging. For MIPS at least, one of the completely wrong design decision has been to map basic register…

Can bass be fixed to remove this design flaw? Is xkas/asar worse than bass? A lot of SMW-adjacent romhacking tools use xkas/asar which preceded bass (the author discussed at https://news.ycombinator.com/item?id=11720057 ). Some alternatives I've come across include macro packs for ca65 to make it assemble for instruction sets it doesn't understand natively, and I hear tass64 has macro packs too.

Unfortunately the author passed away recently. If there is a community fork of bass that would make it easier.

Re: SNES Development Part 1: Getting Started

#26
post #21

I've developed quite a few SNES-related things for fun, mostly using Go and C++, with some 65816 ASM sprinkled in. https://github.com/alttpo/alttpo - A Link To The Past Online. Lets multiple players see and interact with one another in the same game world and synchronize their progress through the game. Exclusive to a customized fork of the bsnes emulator which provides a scripting language and PPU-integrated drawing…

Great idea, there are so many games that would actually be played with even a basic co-op support like this. It's okay it's just an overlay with no shared-game state, still really fun!

Oh but there is shared game state! Most of SRAM data is synced for ALTTP and there's even a PvP feature so you can slash at each other with swords and use some of the items to damage each other. Of course you can enable/disable whatever bits of state to sync or not.

Re: SNES Development Part 1: Getting Started

#27
post #21

I've developed quite a few SNES-related things for fun, mostly using Go and C++, with some 65816 ASM sprinkled in. https://github.com/alttpo/alttpo - A Link To The Past Online. Lets multiple players see and interact with one another in the same game world and synchronize their progress through the game. Exclusive to a customized fork of the bsnes emulator which provides a scripting language and PPU-integrated drawing…

I didn't know there was a v2 of alttpo going on! I will have to give it a look, I wasn't a fan of v1 because of it being tied to an emulator.

Re: SNES Development Part 1: Getting Started

#28

On a related note, the Retro Game Mechanics Explained YouTube channel has excellent videos about how SNES hardware works: https://www.youtube.com/c/RetroGameMechanicsExplained/videos

Agreed, and also want to mention Displaced Gamers https://www.youtube.com/c/DisplacedGamers

Re: SNES Development Part 1: Getting Started

#29

If you decide you really enjoy 65816 development, just a gentle reminder: The Apple IIGS dev community would love to have you and we're seeing new hardware releases at a pace we haven't seen since the 1990s.

Just curious is there an affordable kit to build one's own Apple IIGS? Considering GS is more powerful than II, would love to have one instead of II.

Re: SNES Development Part 1: Getting Started

#30
post #27
post #21

I've developed quite a few SNES-related things for fun, mostly using Go and C++, with some 65816 ASM sprinkled in. https://github.com/alttpo/alttpo - A Link To The Past Online. Lets multiple players see and interact with one another in the same game world and synchronize their progress through the game. Exclusive to a customized fork of the bsnes emulator which provides a scripting language and PPU-integrated drawing…

I didn't know there was a v2 of alttpo going on! I will have to give it a look, I wasn't a fan of v1 because of it being tied to an emulator.

Yep, it's aimed mostly at console users though it works with emulator too, just without sprite sync. WIP on sprite sync for emulator to bring that back
Post reply on HN