Mario Paint Shenanigans
BotB Academy Bulletins
 
 
76808
Level 27 Renderist
b00daw
 
 
 
 
post #76808 :: 2017.01.16 12:33am :: edit 2017.01.16 10:21pm
  
  VirtualMan, Viraxor, shinichi, anewuser, BubblegumOctopus, puke7, Jangler, goluigi and Dimeback liēkd this
Mario Paint ZSNES ZST save state address definitions:

$15F7-$1836/$184F-$1A8E (Song data)

$1837-$1838/$1A8F-$1A90 (Scroll End Boundary Multiplier (Little Endian) 00=No Boundary 01=Shortest End FF=Longest End)
$1839-$1840/$1A91-$1A92 (Loop: 00=No Nonzero=Yes)
$183B/$1A93 (Tempo Slider Position (to the right)) (VISUAL ONLY)
$183C/$1A94 (Tempo Slider Position additional multiplier) (VISUAL ONLY)
$183D/$1A95 (???)
$183E/$1A96 (???)
$183F/$1A97 (???)
$1840/$1A98 (Tempo: 01=Slowest FF=Fastest 00=Pause)
$1841/$1A99 (???)
$1842/$1A9A (???)
$1843/$1A9B (???)
$1844/$1A9C (???)
$1845/$1A9D (Time Signature ($00 = 3/4 $01 = 4/4))
$1846/$1A9E (???)
$1847/$1A9F (???)
$1848/$1AA0 (???)
$1849/$1AA1 (???)
$184A/$1AA2 (???)
$184B/$1AA3 (???)
$184C/$1AA4 (???)
$184D/$1AA5 (???)
$184E/$1AA6 (???)

Mario Paint SNES9x 000 save state address definitions:

All above information is relative to the start address of $0115BF.
The SNES9x save state file is GZIP'd; decompress it.
rainwarrior plays his SNES ROMs here: "C:\Users\rainwarrior\Documents\play\emu\roms\snes\Mario Paint (Japan, USA).sfc"

Song Data Format:

6 byte song data stream offsets:

$00 = Channel 1 note
$01 = Channel 1 instrument
$02 = Channel 2 note
$03 = Channel 2 instrument
$04 = Channel 3 note
$05 = Channel 3 instrument
... repeat up to 96 times "legally" for 576 bytes.

NOTES/FREQUENCIES: B1 ($01) lowest -> G3 ($0D) highest
Highest w/o sharps/flats (other values leak into other notes/instruments and change relative icon vertical positioning in strange fashion)

INSTRUMENTS:
(Standard Instruments; all samples are monaural unless otherwise noted.)
Mario ($00) Xylophone
Toadstool ($01) Tom drum (sample is stereo; left-oriented.)
Yoshi ($02) Yoshi noise
Star ($03) Musicbox tine
Flower ($04) Trumpet
Gameboy ($05) Pulsewave
Dog ($06)
Cat ($07)
Pig ($08)
Swan ($09) Orchestra hit
Baby ($0A)
Plane ($0B) Cello
Boat ($0C) Conga drum ($01-$06 notes D2, F2, G2, A2, A#3, C3) Cymbals ($07-$0D C2, F2, B2, F3, A3, C4, F4) (samples are stereo; right-oriented.)
Car ($0D) Organ
Heart ($0E) Doublebass
(Unused Instruments)
Blank ($0F) SFX ($00 null, $01 crash (low), $02 click (high), $03 cuica, $04 groan, $05 squeak (low), $06-$0A clicks, $0B squeak (high), $0C crash (high), $0D click (need more research to note frequencies.))
Mario Hand ($10) Xylophone
Green Hand ($11) Tom drum
Yellow Point Hand ($12) Yoshi
No Passing Signs ($13) Musicbox tine
No Passing Signs ($14) Trumpet
Oval Pointer ($15) Pulsewave
Oval Pointer/No Passing ($16) Dog
No Passing ($17) Cat
Song End (Yellow) Icon ($18) Pig
Song End (Orange) Icon ($19) Orchestra Hit
Rockets ($1A) Baby
Rockets ($1B) Cello
Rockets ($1C) "Boat" Percussion
Rockets ($1D) Organ
Rockets ($1E) Doublebass
Rockets ($1F) SFX
($20-$7F are repeats of $00-$1F)
Sustain/No Instrument ($80-$FF) (Frequency settings ignored)
Summary: "Positive" values are instruments; and "negative" values are sustain/null.

Other notes:

Two instances of sequence data and song properties data for Undo Dog.
Display and function values are separate.
576 bytes standard sequence data (Mario Paint)
24 bytes of song properties data (Mario Paint)
Mario Paint SRAM file is compressed.
Extended song data starts to crash the player at around ZST $2A00.
ZSNES (current public version) does not save SRAM files properly.
BS Mario Paint versions use the control pad instead of the mouse.

SHO file notes:

offset # of bytes Function
----------------------------
$000 4 STRING 's','h','r','o', (denotes a SHO "ShroomPlayer" file)
$004 1 BYTE Version number (See "Version Notes")
$005 2 WORD Reserved
$007 32 STRING Song Title
$027 32 STRING Author Name
$047 32 STRING SHI (sample pack) filename. (Default: "default.shi")
$067 576 STRING (base) Song Data (See "Song Data Format")
$067 2 WORD (mariopantse) Song Length Value (Little endian $6100 min. $400B max.)
$069 1 BYTE (mariopantse) Song Loop ($00 = on $01 = off)
$06A 1 BYTE (mariopantse) Time Signature ($00 = 3/4 $01 = 4/4)
$06B 1 BYTE (mariopantse) Tempo ($00 = Slowest $9F Fastest)
$06C nnn STRING (mariopantse) Song Data (See "Song Data Format")
$2A7 1 BYTE (base) Tempo ($00 = Slowest $9F Fastest)
$2A8 1 BYTE (mariopants) Song Length ($01 = Shortest $60 = Longest)
$2A9 1 BYTE (mariopants) Song Loop ($00 = on $01 = off)
$2AA 1 BYTE (mariopants) Time Signature ($00 = 3/4 $01 = 4/4)

SHO Version Notes:

$01 = ShroomPlayer
Base version. ShroomPlayer ignores "MarioPants" features.
$02 = MarioPants
Adds features noted above.
$03 = MarioPantsE
Adds even more features noted above. Not compatible with "ShroomPlayer" or "MarioPants".

SHI file notes:

offset # of bytes Function
----------------------------
$000 4 STRING 's','h','r','i', (denotes a SHI "ShroomPlayer" sample pack file)
$004 1 BYTE Version number ($01)
$005 2 WORD Reserved
$007 32 STRING Sample Pack Name
$027 32 STRING Sample Pack Author
$047 9 STRING Reserved
$050 nnn STRING Sample Data
 
 
76821
Level 29 Hostist
puke7
 
 
 
post #76821 :: 2017.01.16 9:36am
  
  Viraxor, b00daw and Jangler liēkd this
gotta unlock that cuica!
 
 
76828
Level 28 Chipist
Jangler
 
 
 
post #76828 :: 2017.01.16 2:18pm :: edit 2017.01.17 3:29pm
  
  Viraxor, b00daw and puke7 liēkd this
  
  HertzDevil hæitd this
some more technical details:

each instrument has 16 possible pitches—the B1 through G3 (in b00daw's terminology) that you can normally place, as well as placeholders for A1, A3, and B3. normally these placeholders are a G2, B2, and C3 respectively, but a few instruments have notes there which are not ordinarily accessible:

mushroom: B3 is between C3 and D3 (nonlinear)
yoshi: A1 is C1
star: A3 is A♯0, B3 is B0
cat: A1 is D4, B3 is B3
baby: A1 is G4, A3 is B3, B3 is D♯1
boat: A3 is very high, B3 is between E3 and F3 (nonlinear)
heart: A1 is C1

edit: see hertzdevil's post below for a technical explanation of how these "placeholders" are determined.
 
 
76830
Level 29 Hostist
puke7
 
 
 
post #76830 :: 2017.01.16 2:55pm
  
  Viraxor, Savestate, RatShack, MiDoRi, Dimeback, b00daw and Jangler liēkd this
yo dawg i heard you like your mario pants extended so i put esoteric mario paint in your mario pants with a mario pants extended extended format
 
 
76832
Level 28 Chipist
Jangler
 
 
 
post #76832 :: 2017.01.16 3:11pm :: edit 2017.01.18 11:00am
  
  Viraxor, b00daw and puke7 liēkd this
and while i'm thinking about it, here are the pitches of the "non-melodic" instruments, ascending from B1 to G3. i'm going to use flats and sharps fairly arbitrarily here.

the mushroom ascends in increasing intervals:
F G♭ A♭ B♭ D♭ F A♭ B E♭ G♭ D♭ G♭ G♭

the pig is tuned a minor third higher than the rest of the instruments:
D E♭ F G A♭ B♭ C D E♭ G A♭ B♭
edit: today i think it sounds more like a whole step.
C♯ D E F♯ G A B C♯ D E F♯ G A

the baby instrument plays two notes, the first of which is tuned a minor second lower than the other instruments:
A♯ B C♯ D♯ E F♯ G♯ A♯ B C♯ D♯ E F♯
the second note is a major sixth above the first:
G A♭ B♭ C D♭ E♭ F G A♭ B♭ C D♭ E♭

boat is wacky. the first couple of cymbals sound melodic to me but the rest don't and the rest also do:
D♯ F♯ G♯ A♯ B C♯ | C♯ F♯ C♯ E G♯ B D

(yoshi is tuned about right)
 
 
76833
Level 28 Chipist
Jangler
 
 
 
post #76833 :: 2017.01.16 5:02pm :: edit 2017.01.16 5:22pm
  
  Viraxor, puke7 and b00daw liēkd this
more stuff:

- the mirroring that b00daw describes is due to the undo feature. the first block of memory is the current song data, and the second block is the undo buffer, which contains a copy of the song data as it was before the last change.
- address $1845 is 1 iff the time signature is 4/4.
- addresses $1837 and $1838 are one little-endian word. their value is 16 + 8 for every beat before the end bar. if you set this to 1584, you'll play through the entire song, 24 bytes of metadata, and then the entire undo buffer before stopping/looping.
- the "natural" tempo range is 2-33.
- i'm not sure what address $183A is. it doesn't change when i toggle looping.

(edited for clarity)
 
 
76881
Level 25 Chipist
HertzDevil
 
 
 
post #76881 :: 2017.01.17 12:07pm :: edit 2017.01.17 5:55pm
  
  Viraxor, puke7, Jangler and b00daw liēkd this
The zero point of the ZST format is $C13, so for example the tempo byte is located at $1845 - $C13 + $7E0000 = $7E0C32 in the RAM. EDIT: An additional copy of the song data can be found at $7EFC00. This is where the data is stored when the user is outside the music editor.

There are a bunch of instrument definitions starting at $254C in the SPC ARAM, copied from $18A130 in the ROM; the corresponding headerless LoROM address is $C2130, and you should be able to figure out other physical file positions from the SPC addresses. The data layout suggests that exactly 30 instruments are defined. (This table is not what N-SPC instruments actually look like.)

- $254C - $2569: SPC sample indices.
- $256A - $2587: Instrument volumes, FF is maximum.
- $2588 - $25A5: Instrument panning. The 6 lower bytes determine the pan direction from 0 (right) to 20 (left); bit 6/7 inverts right/left output respectively. (The N-SPC driver, including its early version in Super Mario World, also does the same thing.)
- $25A6 - $25C3: Relative offsets into the following note table.
- $25C4 - $2686: 15 N-SPC note tables, the lowest and highest notes are 80 and D3 respectively.
- $2687 - $26A4: Fine pitch, FF denotes an upward semitone. There is no downward detune.
- $26A5 - $26C2: maximum note duration in number of ticks.

After that there is still one table which points to N-SPC music frame data, the kind that Super Mario World doesn't have. It might point to complete songs or sound effects.

***

Every instrument only has 13 pitches, the 3 remaining are not so much placeholders as they are the results of out-of-bound array access. Of the 15 note tables, 3 are unused, 3 more are used only by the unused instruments, and the following two do not follow the B1 - G3 order:

- B1 C2 D2 E2 G2 B2 D3 F3 A3 C4 G4 C5 C6, used by instrument 01 (Mushroom)
- A3 C4 D4 E4 F4 G4 G2 C3 G3 C4 E4 G4 C5, used by instrument 0C (Boat, the cymbal sample index seems to be hardcoded)

It is therefore theoretically possible to apply a key signature in Mario Paint during run-time, by manually overwriting the note tables for the melodic instruments. Accidentals still cannot be represented.

EDIT2: This Lua 5.3 script
decodes a Mario Paint SRM file; the resulting music data can be located at 0xB800. To view the painting, open the generated binary file in Tile Molester, set the codec to "4bpp planer, composite (2x2bpp)", then change the canvas size to 32 x 22. The drawing is located at 0x6000, the animation at 0x0, and some animation path data from 0x5800 to 0x5FFF. The whole piece of data can be found at $7E4400 while running Mario Paint.
 
 
76930
Level 28 Chipist
Jangler
 
 
 
post #76930 :: 2017.01.18 11:06am :: edit 2017.01.18 11:30am
  
  Viraxor, puke7 and b00daw liēkd this
think i figured out the maximum amount of memory you can overwrite with song data before crashing stuff:

https://www.youtube.com/watch?v=oRG5ZGTz-R8

not nearly as clean as we'd like it to be; for example, you can see that a section of the memory is overwritten with null bytes at runtime (triple mario heads at the bottom of the screen).

edit: haven't really tested with different song data; might do that next.

edit 2: 704 beats seems to be the maximum "safe" amount.
 
 
77002
Level 27 Renderist
b00daw
 
 
 
 
post #77002 :: 2017.01.20 12:39am :: edit 2017.01.22 3:39pm
  
  Viraxor, Jangler and Dimeback liēkd this
Pretty much "finished" with this... Just have to mark out the dupes, condense it, and associate the applicable instrument tunings.

I just used the Twinkle Twinkle Little Star preset for the example song.

$00 = Boat? (Drumkit)
$01 = Toad (Kick/Tom)
$02 = Cat (Meow)
$03 = Dog (Bark)
$04 = Star (Music Box)
$05 = Car(?) (Organ?)
$06 = Plane (String)
$07 = Pig
$08 = Game Boy (Pulsewave)
$09 = Swan (Orchestra)
$0A = Heart (Bass)
$0B = Synth?
$0C = Flower (Horn)
$0D = Mario (Xylophone)
$0E = Baby
$0F = Yoshi
$10 = Boat (Hat)
$11 = Synth?
$12 = Click
$13 = Undo Dog (Groan)
$14 = Synth?
$15 = Synth?
$16 = Eraser (Squeak)
$17 = Silence (Note cut)
$18 = Warble Horn
$19 = Distortion Overdrive
$1A = Warble Wind Instrument
$1B = Deturned "Asian" Sound
$1C = Baby (Quicker?)
$1D = Baby (Quicker/Softer?)
$1E = Baby (Quicker?)
$1F = Squeaky Percussion
$20 = Silence (Note cut)
$21 = Yoshi (Second half)
$22 = Silence (Note cut)
$23 = Silence (Note cut)
$24 = Silence (Note cut)
$25 = Boat (Woodblock)
$26 = Percussion (Clack)
$27 = Percussion (Clack)
$28 = Percussion (Clack)
$29 = Percussion (Clack)
$2A = Percussion (Tom) (Alt tuning)
$2B = Silence (Note cut)
$2C = Distortion Overdrive
$2D = Wind Percussion?
$2E = Silence (Note cut)
$2F = Silence (Note cut)
$30 = Percussion (Clack)
$31 = Percussion (Clack)
$32 = Percussion (Clack)
$33 = Percussion (Clack)
$34 = Percussion (Clack)
$35 = Silence (Note cut)
$36 = Silence (Note cut)
$37 = Silence (Note cut)
$38 = Silence (Note cut)
$39 = Silence (Note cut)
$3A = Silence (Note cut)
$3B = Percussion (Clack)
$3C = Percussion (Clack)
$3D = Percussion (Clack)
$3E = Percussion (Clack)
$3F = Percussion (Clack)
$40 = Silence (Note cut)
$41 = Silence (Note cut)
$42 = Silence (Note cut)
$43 = Silence (Note cut)
$44 = Silence (Note cut)
$45 = Percussion (Tom) (Alt tuning)
$46 = Percussion (Clack)
$47 = Percussion (Clack)
$48 = Percussion (Clack)
$49 = Percussion (Clack)
$4A = Silence (Note cut)
$4B = Silence (Note cut)
$4C = Silence (Note cut)
$4D = Silence (Note cut)
$4E = Silence (Note cut)
$4F = Silence (Note cut)
$50 = Percussion (Clack)
$51 = Percussion (Clack)
$52 = Percussion (Clack)
$53 = Percussion (Clack)
$54 = Percussion (Clack)
$55 = Silence (Note cut)
$56 = Silence (Note cut)
$57 = Percussion (Tom) (Alt tuning)
$58 = Percussion (Kit) (Alt tuning)
$59 = Silence (Note cut)
$5A = Click
$5B = Percussion (Kit) (Alt tuning)
$5C = Percussion (Tom) (Alt tuning)
$5D = Click (Alt tuning)
$5E = Silence (Note cut)
$5F = Percussion (Kit) (Alt tuning)
$60 = Cymbals (Alt tuning)
$61 = Cymbals (Alt tuning)
$62 = Bongos (Alt tuning)
$63 = Bongos (Quiet)
$64 = Silence (Note cut)
$65 = Silence (Note cut)
$66 = Percussion (Kit) (Alt tuning)
$67 = Silence (Note cut)
$68 = Silence (Note cut)
$69 = Percussion (Kit) (Alt tuning)
$6A = Semi-silent Glitchy High-pitched
$6B = Silence (Note cut)
$6C = Percussion (Kit) (Alt tuning)
$6D = Percussion (Kit) (Alt tuning)
$6E = Percussion (Bongo) (Alt tuning)
$6F = Clicks and Dropping Noise?
$70 = Percussion (Kit) (Alt tuning)
$71 = Cymbal Noisy?
$72 = Percussion (Kit) (Alt tuning)
$73 = Percussion (Bongo) (Alt tuning)
$74 = Percussion (Bongo) (Alt tuning)
$75 = Undo Dog (Groan)
$76 = Percussion (Bongo) (Alt tuning)
$77 = Silence (Note Cut)
$78 = Silence (Note Cut)
$79 = Goofy Squeak Percussion
$7A = Semi-silent percussion
$7B = Percussion (Bongo) (Alt tuning)
$7C = Undo Dog (Alt tuning)
$7D = Percussion (Kit) (Alt tuning)
$7E = Percussion (Kit) (Quiet)
$7F = Percussion (Kit) (Alt tuning)
$80 = Cymbals
$81 = Percussion (Kit) (Alt tuning)
$82 = Silence (Note cut)
$83 = Undo Dog (Alt tuning)
$84 = Silence (Note cut)
$85 = Percussion (Kit) (Alt tuning)
$86 = Goofy Percussion
$87 = Percussion (Kit) (Alt tuning)
$88 = Percussion (Kit) (Alt tuning)
$89 = Silence (Note cut)
$8A = Percussion (Kit) (Alt tuning)
$8B = Violin and Tuba
$8C = Silence (Note cut)
$8D = Silence (Note cut)
$8E = Percussion (Kit) (Alt tuning)
$8F = Glitchy Quiet Noisy
$90 = Silence (Note cut)
$91 = Percussion (Bongo) (Alt tuning)
$92 = Percussion (Kit) (Alt tuning)
$93 = Wineglass/Jug
$94 = Silence (Note cut)
$95 = Silence (Note cut)
$96 = Silence (Note cut)
$97 = Silence (Note cut)
$98 = Silence (Note cut)
$99 = Percussion (Bongo) (Alt tuning)
$9A = Backwards Creepy Sample
$9B = Silence (Note cut)
$9C = Silence (Note cut)
$9D = Silence (Note cut)
$9E = Silence (Note cut)
$9F = Silence (Note cut)
$A0 = Silence (Note cut)
$A1 = Cat (Meow)
$A2 = Percussion Kit
$A3 = Quiet Percussion
$A4 = Silence (Note cut)
$A5 = Silence (Note cut)
$A6 = Percussion Kit (etc)
$A7 = Percussino Kit (etc)
$A8 = Silence (Note cut)
$A9 = Percussion Kit (etc)
$AA = Silence (Note cut)
$AB = Percussions (Star tuning)
$AC = Silence (Note cut)
$AD = Silence (Note cut)
$AE = Silence (Note cut)
$AF = Percussion Kit (etc)
$B0 = Silence (Note cut)
$B1 = Cat (Quiet)
$B2 = Silence (Note cut)
$B3 = Percussion Kit (etc)
$B4 = Silence (Note cut)
$B5 = Silence (Note cut)
$B6 = Silence (Note cut)
$B7 = Silence (Note cut)
$B8 = Percussion Kit (etc)
$B9 = Silence (Note cut)
$BA = Percussion Kit (Clack) (Star tuning)
$BB = Percussion Kit (High Bongo) (Star tuning)
$BC = Cat (Star tuning)
$BD = Dog (Star tuning)
$BE = Star (Star tuning)
$BF = Glitchy car (Star tuning)
$C0 = Harpsicord/Guitar (Star tuning)
$C1 = Pig (Star tuning)
$C2 = Gameboy (alt?) (Star tuning)
$C3 = Swan (Star tuning)
$C4 = Heart (alt tuning)
$C5 = Car (Star tuning)
$C6 = Flower (Star tuning)
$C7 = Mario (Star tuning)
$C8 = Baby (Star tuning)
$C9 = High Yoshi (Star tuning)
$CA = Cymbals (Star tuning)
$CB = Car (Star tuning)
$CC = Click (Star tuning)
$CD = Undo Dog (Star tuning)
$CE = Car (Star tuning)
$CF = Car (Star tuning)
$D0 = Eraser (Star tuning)
$D1 = Silence (Note cut)
$D2 = Tuba (Star tuning)
$D3 = Distorted Overdrive (Star tuning)
$D4 = Warble Organ (Star tuning)
$D5 = Asian Bagpipes (Star tuning)
$D6 = Baby (Part 2) (Star tuning)
$D7 = Baby (Part 1) (Star tuning)
$D8 = Baby (Part 2) (Lower) (Star tuning)
$D9 = Squeaky Percussion (Star tuning)
$DA = Silence (Note cut)
$DB = Yoshi (Part 1 fast?) (Star tuning)
$DC = Silence (Note cut)
$DD = Silence (Note cut)
$DE = Silence (Note cut)
$DF = Bongos (Alt tuning)
$E0 = Clacks (Alt tuning)
$E1 = Clacks (Alt tuning)
$E2 = Clacks (Alt tuning)
$E3 = Clacks (Alt tuning)
$E4 = Clacks (Star tuning)
$E5 = Silence (Note cut)
$E6 = White Noise Mess (Star tuning)
$E7 = Quiet Bongos (Alt tuning)
$E8 = Silence (Note cut)
$E9 = Silence (Note cut)
$EA = Clacks (Alt tuning)
$EB = Clacks (Alt tuning)
$EC = Clacks (Alt tuning)
$ED = Clacks (Alt tuning)
$EE = Clacks (Alt tuning)
$EF = Silence (Note cut)
$F0 = Silence (Note cut)
$F1 = Silence (Note cut)
$F2 = Silence (Note cut)
$F3 = Silence (Note cut)
$F4 = Silence (Note cut)
$F5 = Clacks (Alt tuning)
$F6 = Clacks (Alt tuning)
$F7 = Clacks (Alt tuning)
$F8 = Clacks (Alt tuning)
$F9 = Clacks (Alt tuning)
$FA = Silence (Note cut)
$FB = Silence (Note cut)
$FC = Silence (Note cut)
$FD = Silence (Note cut)
$FE = Silence (Note cut)
$FF = Bongos (Alt tuning)


$254C - $2569 in ARAM respectively goes LEFT to RIGHT of the Mario Paint sequencer instruments Mario > Heart; plus another 15 not currently understood. Will do more research.
 
 
77006
Level 25 Chipist
HertzDevil
 
 
 
post #77006 :: 2017.01.20 3:18am :: edit 2017.01.20 3:19am
  
  Viraxor, b00daw and shinichi liēkd this
You can save a SPC dump in bsnes-plus or ZSNES, it will not play anything but all the valid samples will show up as usual in SPCTOOL (example
). Making the SPC driver load samples beyond $16 may require assembly.
 
 
77010
Level 22 Mixist
OrdinateIsDead
 
 
 
post #77010 :: 2017.01.20 8:38am
  
  Dimeback and shinichi liēkd this
i just wanted to play video games ;_;
 
 
77030
Level 27 Renderist
b00daw
 
 
 
 
post #77030 :: 2017.01.20 5:18pm
  
  Viraxor liēkd this
Oh nice... :) I see how then we can just convert the SPC to an IT for sample packs too.
 
 
77098
Level 28 Chipist
Jangler
 
 
 
post #77098 :: 2017.01.22 9:28am :: edit 2017.01.22 8:22pm
  
  Viraxor, puke7, b00daw, Dimeback and Savestate liēkd this
i should have linked this a few days ago, but here's an IT template and accompanying python script which injects the pattern data into an snes9x savestate. you can access the 3 extra pitches and the rocket instrument, but nothing that requires altering stuff other than song data. you can create extended songs, though (ymmv).

https://db.tt/RR1HU6RBYZ


edit: i will not be answering any questions
 
 
77118
Level 10 Mixist
RatShack
 
 
post #77118 :: 2017.01.23 10:00am
  
  Viraxor liēkd this
In theory, if you are able to inject song data into a snes9x savestate, you could then save your game data within Mario Paint to generate a .SRM file. You could then write the .SRM file to a cart's SRAM chip...
 
 
77121
Level 28 Chipist
Jangler
 
 
 
post #77121 :: 2017.01.23 11:12am
  
  Viraxor and b00daw liēkd this
we can almost do SRAM, but it happens to be compressed via a method similar to the deflate algorithm (combined LZ77 and huffman encoding). hertzdevil has written a script which can decode the SRAM
, but i've only written half an encoder script. :P
 
 
77122
Level 28 Chipist
Jangler
 
 
 
post #77122 :: 2017.01.23 11:12am
  
  shinichi liēkd this
i really need to vary my sentence structures
 
 
77123
Level 27 Renderist
b00daw
 
 
 
 
post #77123 :: 2017.01.23 12:50pm :: edit 2017.01.23 12:54pm
  
  Viraxor liēkd this
To expand on ARAM (SPC) and RAM definitions:

"$254C - $2569: SPC sample indices" from Hertzdevil's post...

Regarding the Song Stream information with the instrument value:

The 15 instrument values, $00 through $0E, correspond to ARAM (sample references) $254C through $255A; Mario through Heart.

The $0F instrument (which has a blank icon) or $1F which has a rocket icon, we call "rocket instrument", loads one-hit samples with their own tunings. The sample references are stored in ARAM $255B-$2569.

All other volume, panning, tuning, etc. (related to HertzDevil's post) follows the same offset pattern.

Additional notes:

Until we figure out additional hacky methods to bypass the song "metadata", it is possible to assign the displayed instrument values a blank sample in ARAM so that they do not play unintentional notes. The cost is rests for a few frames.

This means you could compose your song with a tracker and then assign unused samples to the instruments that have undesired sound.

Afterward you could even replace other samples with ones that were used in those sections to retain your desired samples.
 
 
166124
Level 29 Chipist
nitrofurano
 
 
 
post #166124 :: 2023.01.23 12:37am
so, perhaps we can convert a savestate to .sho and back? i wonder no one started coding a converter...
 
 
166129
Level 27 Chipist
kilowatt64
 
 
 
post #166129 :: 2023.01.23 4:59am
  
  nitrofurano liēkd this
mariopants can natrively load and export to .zst, at least, but I'm not sure how useful it'd be for regular format entries since .zst is no longer allowed as a file type submission. Maybe as a wildchip type entry?
 
 
178157
Level 28 Chipist
BubblegumOctopus
 
 
 
post #178157 :: 2023.10.24 12:05am
  
  mirageofher, Viraxor, puke7, MelonadeM and damifortune liēkd this
bumping this thread so I can come back to it more readily if I forget how to spell shenagi... shenanin..... shenaningans.... yeah
 
 

LOGIN or REGISTER to add your own comments!