Stef
Moldy Popcorn
Posts: 34
|
Post by Stef on Aug 5, 2016 18:04:20 GMT -5
I've updated the XGM driver wrapper to the last version of the XGM driver (which has not be yet released in official SGDK ^^). It mainly add a new setTempo(..) method (by default aligned on system speed) so you don't need anymore to have NTSC and PAL version of track. Also you have a getElapsedTime() method to know elapsed played time (useful mainly for player). Others changes are more related to internal implementation (now it uses the 68000 vint event to sync music and no more Z80 vint which was causing troubles on some clone systems). I've updated the first post to relate the changes. Please report any problems ! Have fun
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 6, 2016 6:45:01 GMT -5
Amazing news, Stef! I'll get this into SecondBASIC this weekend
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 6, 2016 7:03:40 GMT -5
Looking over the test.bex file, there's a method in the vblank - I'm guessing this is required now as it handles the timing, right? I just want to make sure I update everything in the documentation for SecondBASIC correctly.
Also, for any SecondBASIC users that want to just copy and paste the code, it should work, but you'll need to add a colon on the vint line label, and again on the @addr_done line label. BEX automatically creates the line labels based on no spaces before the line label, where SecondBASIC doesn't as there's no space requirements.
|
|
Stef
Moldy Popcorn
Posts: 34
|
Post by Stef on Aug 6, 2016 10:04:19 GMT -5
Yeah, one of the biggest difference is that you need now to use the vint event so it handles music timing. In fact you can do it in your main loop, after the blank wait but that means that if your game doesn't run at 60 FPS then your music will slowdown. It's why it's better to handle it through the vint event ;-) I can change the vint label so people can directly take the code for second basic :-)
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 6, 2016 10:14:40 GMT -5
That's what I though. And nope, no need to worry about changing anything for SecondBASIC, I just wanted to make sure I was following everything properly so when I update SBS, I can document it with the right info.
Also love the additional features/commands with the new driver. I'm going to see what I can do about making a music player example like you made over on Sega 16, and use that for one of the included examples.
|
|
Stef
Moldy Popcorn
Posts: 34
|
Post by Stef on Aug 6, 2016 14:40:49 GMT -5
Looking forward the implementation in SBS :-) To be honest the XGM player I made use a not really straightforward method (basically parsing the XGM file and emulating YM/PSG) to get the live YM and PSG status but at least you can do a simple player displaying elapsed time now very easily ;-) There is also the possibility to read out current channel level directly from the YM chip (method is explained on Spritesmind) but that would only on real hardware.
|
|
|
Post by tiberiyltim on Aug 7, 2016 18:14:08 GMT -5
Does not work in Fusion emulator - black screen and silence.
|
|
Stef
Moldy Popcorn
Posts: 34
|
Post by Stef on Aug 8, 2016 13:57:30 GMT -5
I tested with Fusion and it work (sometime i need to press START to make music playing though). Do you use the last version of BEX ? No error during compilation ?
|
|
|
Post by tiberiyltim on Aug 8, 2016 16:46:48 GMT -5
BEX 1.37 Fusion 3.51 - black screen and silence.
upgrade Fusion 3.64 - normal.
OK! Don't worry.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 9, 2016 6:19:12 GMT -5
I wonder what's causing it to not play unless you press start, or am I misunderstanding and XGM 2.0 works without issues? I haven't had a chance to put it into SecondBASIC yet (preparing for an expo this weekend coming up), so I haven't messed around with the new version.
|
|
Stef
Moldy Popcorn
Posts: 34
|
Post by Stef on Aug 10, 2016 9:15:02 GMT -5
It comes from an initialization state issue, i need to check that it does not occurs on real hardware. The weird think is that even on Fusion it does not always happen ? I think i can easily fix it sending a initial stop play command in the xgm_init method but still i need to check that.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 10, 2016 9:45:04 GMT -5
I'll do some prelim testing in SecondBASIC. I had a hardware failure yesterday that lost the last 2 and a half months of updates on it. Fortunately I have most things documented to reapply the fixes, but I can copy and paste in the mean time and use my flash boards to test it out on the official hardware. May take me a few days as I have to prepare for an expo this weekend, but I'll let you know any results that I find
|
|
|
Post by vetea on Aug 10, 2016 10:00:31 GMT -5
Arggg ... Keep the old version for your expo Elusive !!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 10, 2016 10:31:28 GMT -5
Arggg ... Keep the old version for your expo Elusive !! Unfortunately the laptop was the thing that failed, so I don't even have that at the moment. I was able to pull my files onto my desktop, but the crash lost some unsaved work that I was working on. That's okay, though, as I'll just redo those fixes and add in a few more features for version 3 (image quantizer and command line compiling will be included in that release)
|
|
|
Post by landeel on Sept 14, 2016 18:11:43 GMT -5
Thank you so much for this. I have just one question: How can I make the music play again once it ends (loop)? Thank you! Answering my own question, there's a command-line tool called "vgm_trim" that adds a loop. YAGAC MD finally has proper music loops without any counters. Just do: Get it here: github.com/vgmrips/vgmtools
|
|