don't click here

SMPS Player with Visuals (Preview)

Discussion in 'Technical Discussion' started by Oerg866, Apr 22, 2010.

  1. So I thought I should post a little preview about it.

    [​IMG]
    [​IMG]
    [​IMG]

    This SMPS player is losely based on my bugfix of JoseTB's SMPS ROM that did nothing other than play a SMPS music. After some hard work that took roughly about 4 months to complete, I finally have a SMPS player with visuals, like I always wanted it before :)

    * Logo on top
    * Current note & Instrument on all channels
    * Ability to give names to songs
    * Fully compatible with real hardware

    TODO:
    * Loader that figures out whether FM6 = PCM/FM6, PSG3 = NOISE/PSG3
    * Gradient on the VU meter
    * Much more to come (Intro, Changing top logo with UP/DOWN buttons, pallette shifting for demo-like effects on font etc.)


    Preview ROM: http://oerg866.tototek.com/evoke3.bin

    Comments and criticism and feature requests are welcome.
     
  2. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    Coordination flag $F3 determines that, so I hope you can switch from tone to noise at will! Seriously, read this.
     
  3. Well, I cannot read coordination flags because all I have to read is a small memory area.

    However, I might have a solution: If the channel is noise, then the note value is always $0000.

    The FM channel thing though, that's quite 'lot more complicated.
     
  4. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    Then you should probably go and modify SMPS to do what your player needs to do. It's not that hard once you knowwhere everything is. Are you using SMPS Z80 or SMPS 68k?
     
  5. SMPS 68k
     
  6. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    Then it's easy: just find where the effects are handled, set a flag in RAM, then clear it when a new song is played.
     
  7. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Looks clean and to the point. I happily await for proper channel naming and a source release.

    I will say that Fraggle sounds nice, too. :P
     
  8. Mairtrus

    Mairtrus

    Get a load of this!! Tech Member
    27
    0
    0
    Mendoza, Argentina
    Sonic Z. The Z DOESN'T means nothing.
    Or even easier, check the location $FFF1F1. If the value is $E0, you have the NOISE. Whatever else (I think it's $C0), it's the PSG 3. Aditionally, the bit 7 at $FFF040 controlls if the DAC channel is activated or not. The same bit at $FFF160 do the same function for the FM6. Understandable?
     
  9. Wow, thanks, mate! :)
     
  10. ICEknight

    ICEknight

    Researcher Researcher
    Looks very cool. Does it work by adding the music tracks at the end of the ROM, or something like that?
     
  11. well. it works using standard includes and a few extra data you have to specify (Song name etc).

    Right now I'm trying to eliminate a bug that makes the pcm-driver not work right for samples over $87 for some reason.
     
  12. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    The Z80 driver in Sonic 1 resamples the existing timpani sample if the number is above $87. This is done using special entries in the DAC table. For what it's worth you probably shouldn't be modifying the Sonic 1 DAC driver if you want something truly general purpose. Use jman2050's driver or write a new DAC driver instead.
     
  13. Mairtrus

    Mairtrus

    Get a load of this!! Tech Member
    27
    0
    0
    Mendoza, Argentina
    Sonic Z. The Z DOESN'T means nothing.
    Wrong. The "special cases" are handled by the M68K, specifically by the routine loc_71CAC. It looks something like this:
    Code (ASM):
    1.         btst    #3,d0           ; it's a special timpani?
    2.         bne.s   loc_71CAC       ; if yes, branch...
    3.         move.b  d0,($A01FFF).l      ; writes the sample's number into the Z80 RAM
    4.  
    5. locret_71CAA:
    6.         rts             ; leave...
    7. ; ===========================================================================
    8.  
    9. loc_71CAC:
    10.         subi.b  #$88,d0         ; adjusts to the correct number
    11.         move.b  Timpani_Pitches(pc,d0.w),d0 ; loads the modified pitch for the timpani
    12.         move.b  d0,($A000EA).l      ; modifies the pitch
    13.         move.b  #$83,($A01FFF).l    ; plays the normal timpani
    14.         rts             ; leave...
    15. ; End of function Sound_PlayDAC
    16.  
    17. ; ===========================================================================
    18. Timpani_Pitches: dc.b $12, $15, $1C, $1D, $FF, $FF
    In other words, the engine just modifies the current pitch asociated to the (unique) timpani entry in the DAC table in the Z80 code. You only need to cut off the lines above to erase that restriction...
     
  14. Well, actually I am using jman's driver.
     
  15. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    I sincerely hope that modification of DAC samples are done in an ASM format and not a binary.
     
  16. Well, you're in luck.

    Code (Text):
    1. PCM_Table:
    2.     pcm_table_entry a81,a81_end,$2; Sample 81
    3.     pcm_table_entry a82,a82_end,$2; Sample 82
    4.     pcm_table_entry a83,a83_end,$2; Sample 83
    5.     pcm_table_entry a84,a84_end,$2 ; sample 84
    6.     pcm_table_entry xguard1,xguard1_end,$9; Sample 85, XGUARD SNARE1
    7.     pcm_table_entry xguard2,xguard2_end,$9; Sample 86, XGUARD SNARE2
    8.     pcm_table_entry xguard3,xguard3_end,$9; Sample 87, XGUARD HAT1
    9.     pcm_table_entry xguard4,xguard4_end,$9; Sample 88, XGUARD HAT2
    10.     pcm_table_entry xguard5,xguard5_end,$9; Sample 89, XGUARD HAT3
    11.     pcm_table_entry xguard6,xguard6_end,$9; Sample 8a, XGUARD HAT4
    12.     pcm_table_entry hc1, hc1_end, $2; 8b
    13.     pcm_table_entry hc2, hc2_end, $2; 8b
    14.     pcm_table_entry hc3, hc3_end, $2; 8b
    15.     pcm_table_entry hc4, hc4_end, $2; 8b
     
  17. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    New idea: make programs that'll create a custom ROM using the sound player given file names like dac81.bin, song81.bin, etc.
     
  18. Bibin

    Bibin

    DON'T LET THE SUN LAUGH AT YOU. Member
    881
    0
    0
    New York City
    Ghost in the Machine
    This is really great, but why in the world did you do Cleartype-esuqe antialiasing on the text?