BlastTracker - Compose SMPS music on your Mega Drive

Discussion in 'Engineering & Reverse Engineering' started by Wafer, Jul 10, 2019.

  1. Wafer


    Owner of "objectively bad opinions" Member
    Disassembling n00bs, WIP
    So, I've been working on this for long enough that I'm pretty burnt out by it, but I have something that's at least potentially usable by other people now.


    BlastTracker is for composing SMPS music natively on Mega Drive hardware, or a clone or emulator. It's something like a cross between a tracker interface, and looking at a SMPS2ASM song in a .lst file.

    Controls are as follows:
    Code (Text):
    1. General controls:
    2. C + up/down: Increment/decrement selected value
    3. Start:       Close window/switch view
    5. Pointer controls:
    6. C + up/down: Move pointer destination
    7. A:           Move cursor to pointer destination
    9. Song editing:
    10. A + up/down:    Insert new line before/after current line
    11. A + left/right: Delete current line and select previous/next line
    13. Note editing:
    14. B:              Make line a note if it is a flag, otherwise set default note pitch and length
    15. B + up/down:    Change pitch (rest is a pitch)
    16. B + left/right: Change length
    18. Flag editing:
    19. C:           Make line a flag if it is a note. If the destination param for jump/call/loop is selected, move cursor to the destination.
    20. Left/right:  Select param
    21. C + up/down: Change flag type if whole line is selected, increment/decrement value if param is selected.
    22.              If Destination param for jump/call/loop is selected, behave like pointer controls.
    There are mute controls for each channel, as well as a configuration pane. You don't have to worry about using an smpsStop to mute/disable the DAC, BlastTracker handles that for you. The solo button is there but... I didn't get round to making that work yet. You can achieve the same effect by just muting other channels though.

    Tempo is expressed as frames per ~4.26 seconds (NTSC). In the future I hope to make this more human readable, and use real note lengths.

    Lines are colour coded white for notes, green for most flags, orange for jump, loop, or call flags. I tried to make the palette as colour-blind friendly as possible, but if you want to hexedit the palettes they're starting from $45C in the ROM.

    The driver is Clownacy's V2 Clone Driver, because (I believe) I needed a 68k driver and AMPS wasn't out at the time. It should be good for making music for Sonic 1, 2 and probably 3.

    I'm going to write a utility to let you extract the song from SRAM to an ASM file, so all being well I'll swing back round in a few days to post that. In the mean time, you can still save to and load from SRAM, so it's enough for anyone to get on with writing a song if they want to.

    Future plans:
    - Change the driver
    - Make it a segment based editor a la LSDJ
    - Better way to manage tempo
    - PSG envelope editor?
    - Better controls (support for Master System/6-button pads?)
    - Feedback from the UI to somehow show playback progress, or at least what notes are being played.

    Clownacy for the driver
    Everyone who's ever touched SMPS2ASM
    Matt Phillips for the example code that got me started

    The font is unscii-8, because I wanted a PD font that didn't make my eyes water, and it was the first good candidate.
    Last edited: Jul 10, 2019


    The cute one here Tech Member
    This looks pretty interesting so far! Although, I'd like to see a more graphical representation of the FM instruments, I like the idea so far. One problem I have however, the controls are absolutely horrible. I know you've listed them in your post, but they are just unintuitive and will probably take very long to get used to. Also, if you were able to edit already pre-made SMPS2ASM files, that would be amazing. What it would be really useful for, is playing around and changing things here and there, for example for testing the FM voices or modulation settings. Nonetheless, this looks very promising and that it could be very useful in the future!
  3. JustMe


    Huh Member
    Planet Earth
    Being lazy
    Composing your own SMPS? It is amazing. I never saw a program that help you composing a smps (not a midi). It's great. It would be helpful for ROM hackers i think
  4. Wafer


    Owner of "objectively bad opinions" Member
    Disassembling n00bs, WIP
    Thanks for the feedback! I agree on all points. I just got so burnt out I wanted some feedback for the effort already put in. It's by far and away the most original code I've put into any programming task ever (I don't code for a living un(?)fortunately).

    Will probably trim essential controls down to a Master System pad (1/B for insert/back in the "windows", 2/C + d-pad to change stuff) and then support 3/6 button pads with extra functions like clipboard and stuff. My goal for the UI changed over the course of development, but my controls still represent my first design (which is about the only thing I planned in advance).

    Better FM instrument UI will come once I, err, actually understand FM synthesis. Editing existing SMPS2ASM files shouldn't be that big a deal, since for a long time it was just loading the 2 player vs music by default. Will probably require for the user to have an assembler installed for that.

    Well that's embarrassing. I tacked on the SRAM saving code so fast that I neglected to include the size of FM voices, so if you had more than one voice it would screw up in a royal fashion. I've just uploaded a new version to fix that, but it breaks the save format in the original upload. Sorry!
    Last edited: Jul 11, 2019