Dear Sonic Retro, Today I release my main project at public playground release for the first time. It is entered in the HAcking contest just for the heck of it. http://oerg866.tototek.com/SMPSPLAY_PUBLIC.ZIP Criticism&Comments welome. The pack right now contains the demo song and PSG/PCM definitions formatted to Sonic 1 standards. The toolkit sources are public domain. Cheers, Oerg Code (Text): ______________________________________________________ | | | .d8888b. 888b d888 8888888b. .d8888b. | | d88P Y88b 8888b d8888 888 Y88b d88P Y88b | | Y88b. 88888b.d88888 888 888 Y88b. | | "Y888b. 888Y88888P888 888 d88P "Y888b. | | "Y88b. 888 Y888P 888 8888888P" "Y88b. | | "888 888 Y8P 888 888 "888 | | Y88b d88P 888 " 888 888 Y88b d88P | | "Y8888P" 888 888 888 "Y8888P" | | | | h t t p : / / o e r g 8 6 6 . t o t o t e k . c o m | | | | 8888888b. 888 By Oerg866 Software (C) 2010 | | 888 Y88b 888 --------------------------------- | | 888 888 888 | | 888 d88P 888 8888b. 888 888 .d88b. 888d888 | | 8888888P" 888 "88b 888 888 d8P Y8b 888P" | | 888 888 .d888888 888 888 88888888 888 | | 888 888 888 888 Y88b 888 Y8b. 888 | | 888 888 "Y888888 "Y88888 "Y8888 888 | | 888 | | Y8b d88P V E R S I O N | | "Y88P" 2 . 5 | |______________________________________________________| | | | Dear user, | | | | Thank you for downloading my SMPS Player for the | | SEGA Mega Drive / Genesis system! Oh, and thank you | | for caring to read the ReadMe-File =P! | | | | My SMPS player is simple to use and visualizes what | | happens inside SMPS just like you want it, and while | | that is actually enough to be a program itself, it | | actually lets you have many songs specializing its | | name and all, adding more and custom (!) PCM samples | | just how you feel the need to! | | | | The player features: | | | | * Correct channel recognition and naming | | (FM6 / PCM and PSG3 / Noise) | | * VU-Meter-ish bars for visualisation's sake | | * Display of current note and instrument | | (With a REALLY sexy font drawn by me :3) | | * A *lot* of music slots! ($81 until $FB) | | * Simple to use programs to guide you through adding | | stuff | | * Song naming | | * Simple controls for changing current song | | * A sexy logo with effects | | * A sexy scoller XD | | | | The player comes pre-loaded with some PCM samples: | |______________________________________________________| | | | Sample Description ------------------- | | 81 Base drum Note: this is Sonic | | 82 Snare drum the hedgehog 1 defs | | 83 High timpani + clap + cymbal !!! | | 84 Clap ------------------- | | 85 Cymbal | | 88 Hi-Mid timpani | | 89 Mid timpani | | 8A Lo-Mid timpani | | 8B Low timpani | |______________________________________________________| | | | Credits and thanks: | | | | Jman2050 PCM Driver | | JoseTB Initial Idea and SMPS Extraction | | TmEE Various advice, explanation, additions | | Jorge Nuno Testing | | Sik Testing & Help | | Nineko Motivation, Testing | |______________________________________________________| | | | For help with the included tools, please read | | \TOOLKIT\README.TXT | |______________________________________________________| | | | W W W H H AAA TTT ' SSS W W W H H EEE RR EEE ?? | | W w W H H A A T ' S W W W H H E R R E ? | | W W W HHH AAA T SSS W W W HHH EEE RR EEE ? | | W W W H H A A T S W W W H H E R R E | | WWWWW H H A A T SSS WWWWW H H EEE R R EEE ? | | | | SMPSPLAY FOLDER | | \ASM\ SMPSPLAY assembly files | | \GRAPHICS\ Graphics stuff | | \MUSIC\ Music file directory | | \S1DRV\ Sonic 1 Sound Driver | | \SAMPS\ PCM Sample directory | | \TOOLKIT\ SMPSPLAY Tools | | \ASM68K.EXE 68k assembler program | | \BUILD.BAT SMPSPLAY Builder | | \README.TXT This file | | | | ASSEMBLY FILES (PLEASE DO NOT EDIT IF YOU'RE A NOOB) | | | | AMOUNT.ASM Music Amount Equate | | CONTROL.ASM Controller routines | | DATA.ASM Some data the program uses | | EQUATES.ASM Some necessary equates | | GFXSTUFF.ASM Graphics data and stuff | | HEADER.ASM ROM Header | | INCLUDES.ASM ASM File includes | | MD_INIT.ASM Initialization of the sys | | MusicText.ASM Routines for song names | | MusicPTR.ASM Pointers to Musics | | MUSTEXT.ASM Song name pointers | | NUMSTEXT.ASM Screen printing routines | | OTHER.ASM Other stuff... | | OTHER.MAC Some (unused =P) macros | | PAL_FX.ASM The logo color effect | | PALETTE.ASM Palette loading routine | | PCM_SAMPLES.ASM PCM Sample related things | | PCM_TABLE.ASM PCM Sample lookup table | | PCMSAMPS.ASM Inclusion of PCM Samples | | PSGINDEX.ASM PSG envelope pointers | | PSG_INST.ASM PSG envelopes | | SCROLLER.ASM Scrolling routine | | SEGA.I Some SEGA macros | | SNDTYPE.BIN Sound types | | SONGLIST.BIN SMPS Songs | | SONGNAME.ASM Song names | | TILESHIT.ASM Tile load stuff etc etc... | | TIMING.ASM Some timing stuff | | VDP.ASM VDP setup | | VU_STUFF.ASM VU_Meter drawing routine | |______________________________________________________| | | | I hope you enjoy this ! | | | | If you have any questions, do not hesitate to ask ! | | | | http://oerg866.tototek.com | | [email protected] | |______________________________________________________|
In a word: soniNeko :U Seriously though, glad to see this thing released, and thanks for the credit, even if I did almost nothing at all, lol.
Either I'm blind (which is probably the case) or you didn't include the file MAIN.ASM in the download. Because it's missing, I can't build.
Wow, just thought I'd drop in to say that player is amazing, thanks for sharing. :O This is the result of toying with the other tool, followed by output to this and VGMTool: http://djtbmx.stdrand.com/junkpile/djtBMX_...s-oerg-test.vgz PS: I had trouble 'adding' onto the playlist, ended up making the ROM crash after silence if I tried changing track, managed to get this playing by replacing song81.
Oerg866: Yes. Adds an entry in their relevant files, builds without errors, but I can't seem to get it to play a track other than the first one.
This is awesome! Really enjoying the voice selection and how well you make use of the channels. You've definitely got the hang of it.
Oerg866: http://djtbmx.stdrand.com/junkpile/BUILT.bin (built ROM, crashes on attempt to change track) http://djtbmx.stdrand.com/junkpile/djtBMX_...s-oerg-test.bin (the SMPS bin I want to add) Thanks.
I'm very sorry for the late response. However I did take a look at your problems now: I was able to successfully add your file without problems. Tested it twice. Can you reproduce it?
I'm bumping this topic to report some quite serious bugs. The first bug is, that the DAC driver doesn't support bank switching within DAC samples, so if a sample starts e.g. at 0x7000 and ends at 0x8FFF, there'll be play garbage. (usually a terrible noise) To solve this edit PCMSAMPS.ASM: 1. insert a line "align $8000" at the start of the file 2. after you included up to 32768 bytes (not a single byte more), put another "align $8000"-line after the sample#_end-line Example (fixed original ASM file): Code (Text): align $8000, $FF sample1: incbin samps\samp1.snd ; include 1700 byte sample sample1_end: even sample2: incbin samps\samp2.snd ; include 3808 byte sample sample2_end: even sample3: incbin samps\samp3.snd ; include 8236 byte sample sample3_end: even sample4: incbin samps\clap.snd ; include 2526 byte sample sample4_end: even align $8000, $FF ; fill remaining 16498 bytes of the bank, as it isn't enough for 18476 bytes (1978 bytes too much) sample5: incbin samps\cymbal.snd ; include 18476 byte sample sample5_end: even It will work this way, but your samples are limited to 32768 bytes. The second bug is worse: If you try to play a DAC sample with the ID A0 or higher, the DAC driver will screw up entirely (it plays all data in the ROM, beginning at the offset of the sample you wanted to play). Playing another DAC sample won't do anything anymore and you need to reset the emulation to make it work again. I made an SMPS DAC Test ROM to show this. I'd like to fix it by myself, but I'm no asm coder, so that's beyond my skills. Everything else works fine and it's very useful to test mid2smps conversions. (and to make vgms of them)
The second bug sounds like an error in jman2050's code from long ago =P The first thing is a problem most drivers have; since this is using ASM68K, there is a way to automate this, assuming ASM68K can translate macro parameters into label names (as can), using something along these lines (invalid syntax; fix as needed): Code (Text): PCMSample macro startlabel, endlabel, filename if (*+filesize(filename))>((*&$FF8000)|$7FFF) dcb.b ((*&$FF8000)+$8000)-*,0 ; or $FF, or any other byte ; ... actually will align $8000,$FF work as well? if so that would be better since it's simpler =P endif startlabel: incbin filename endlabel: endm as ASM68K provides filesize() (Assemblers need to stop using * for the current pc as it can get confused with the multiplication symbol * if the expression parser is dumb enough...)
Do you mean something like this? Code (Text): PCMSample macro startlabel, endlabel, filename if ((*+filesize(\filename))&$FF8000)>(*&$FF8000) cnop 0, $8000 endc \startlabel: incbin \filename \endlabel: endm Blame whoever makes assembly syntax. I don't think there's any situation in asm68k where that issue can arise though, since * is considered the multiplication operator when expecting an operator and the current PC when expecting an operand. Remember that * can't be an unary operator here. EDIT: lol $20000 *fixes*
Thanks, I got it to work: Code (Text): align macro ; cnop only padds with 0 ;cnop 0,\1 dcb.b ((*&(~(\1-1)))+\1)-*,\2 endm PCMSample macro startlabel, endlabel, filename if ((*+filesize(\filename))&$FF8000)>(*&$FF8000) align $8000, $80 endc \startlabel: incbin \filename align 2, $80 \endlabel: endm align $8000, $FF include ./ASM/PCMSAMPS.ASM Does anyone have a solution for the second bug?
Fixing the second bug would require access to the source code to jman2050's Z80 driver, which it does not appear either he or oerg866 provided.
You could just workaround it by managing the PCM sample table on the 68k side, and just using a single entry on the Z80 side and moving the appropriate values to Z80 ram when you want to play a sample.