Giter Site home page Giter Site logo

flamewing / mdtools Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 3.0 747 KB

Assorted tools for the Sega Mega Drive

License: GNU Lesser General Public License v3.0

C++ 94.07% CMake 5.93%
command-line-tool cplusplus cplusplus-14 sega-genesis sega-mega-drive sega-megadrive

mdtools's Introduction

flamewing's GitHub stats

Top Languages

mdtools's People

Contributors

clownacy avatar flamewing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mdtools's Issues

autotools build error

I'm running into the problem described here. Apparently it has to do with m4 macros not agreeing with Windows line-endings.

I recall Git having an option to force-convert txt files and the sort to CRLF, so there's probably a similar thing to disable it specifically for .m4 files.

SMPS2ASM not preserving FM voice TL high bit

I was noticing an issue with some Sonic CD SFX that I ran through a modified SMPS2ASM build, and it had to do with SMPS2ASM inserting high-bits in the TL bytes that weren't meant to be there.

SMPS2ASM currently inserts TL high-bits based on the voice's algorithm setting. There are some voices that don't follow this rule, and I've seen the tool properly handle a few of these. For example, voice 3 of Sonic 2's title screen music has an extra bit.

;	Voice $03
;	$39
;	$06, $60, $30, $01, 	$3F, $3F, $5F, $5F, 	$11, $0F, $13, $09
;	$05, $04, $04, $03, 	$2F, $2F, $2F, $2F, 	$27, $2C, $97, $80
	smpsVcAlgorithm     $01
	smpsVcFeedback      $07
	smpsVcUnusedBits    $00
	smpsVcDetune        $00, $03, $06, $00
	smpsVcCoarseFreq    $01, $00, $00, $06
	smpsVcRateScale     $01, $01, $00, $00
	smpsVcAttackRate    $1F, $1F, $3F, $3F
	smpsVcAmpMod        $00, $00, $00, $00
	smpsVcDecayRate1    $09, $13, $0F, $11
	smpsVcDecayRate2    $03, $04, $04, $05
	smpsVcDecayLevel    $02, $02, $02, $02
	smpsVcReleaseRate   $0F, $0F, $0F, $0F
	smpsVcTotalLevel    $00, $97, $2C, $27

smpsVcTotalLevel retains this bit, so there's no problem. This only works for songs with extra bits, however. Where the problem does start is when a voice has fewer bits than the algorithm byte indicates, such as Sonic CD's SFX 0xDF.

;	Voice $00
;	$07
;	$04, $04, $05, $04, 	$1F, $1F, $15, $15, 	$00, $00, $00, $00
;	$00, $00, $00, $00, 	$1F, $1F, $1F, $1F, 	$7F, $7F, $80, $80
	smpsVcAlgorithm     $07
	smpsVcFeedback      $00
	smpsVcUnusedBits    $00
	smpsVcDetune        $00, $00, $00, $00
	smpsVcCoarseFreq    $04, $05, $04, $04
	smpsVcRateScale     $00, $00, $00, $00
	smpsVcAttackRate    $15, $15, $1F, $1F
	smpsVcAmpMod        $00, $00, $00, $00
	smpsVcDecayRate1    $00, $00, $00, $00
	smpsVcDecayRate2    $00, $00, $00, $00
	smpsVcDecayLevel    $01, $01, $01, $01
	smpsVcReleaseRate   $0F, $0F, $0F, $0F
	smpsVcTotalLevel    $00, $00, $7F, $7F

As you can see, the original TL bytes are $7F, $7F, $80, $80, but this will assemble to $FF, $FF, $80, $80 because of the algorithm byte.

Personally, I think SMPS2ASM should just stop automatically managing TL bits, since the inconsistent pattern of so many Sonic voices makes me think they were all added manually.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.