Comments (4)
Heyo! Thanks for making LSDj and this tool!
I'd love to get 9.2.0+ support working to include music in a SGB demo.
I made a quick change to lsdpack.cpp and some libgambatte files to basically replace the LCD Interrupt handler with a Timer interrupt handler, changing otherwise nothing.
I've then recorded a 9.3.3 tune in DMG mode (because CGB has double speed timers, halving the song tempo in the player) and built the example boot.s.
Sample / wavetable playback is a bit scratchy (player.s probably needs to be updated with improved wave swap routine) but otherwise the song seems to play fine. If i can get the wave channel playing nicely, would you be interested in a pull request?
from lsdpack.
from lsdpack.
Awesome, thank you. I have forked the repository and pushed my changes of lsdpack. Will pull request later once i think it's finished.
The way I am currently handling compatibility with older versions is to check the version number in the GB header of the ROM and decide which interrupts to capture based on that, with optional command-line flags to override the auto-detection.
I have not tested v4 specifically, but compatibility should remain identical with previous lsdpack versions, unless someone edited the ROM header (then they would need to use the command-line flag to force <9.1.C mode).
Note: I moved setting the interrupt handler inside load_gb to be able to do it on a per-ROM basis, so you could mix old and new versions.
Sample playback is actually not that bad, I'm just noticing more crackling as the player swaps out the wave. Looking at recordings it seems like newer LSDj versions have a much more graceful way of swapping waves, which doesn't cause such a noticable audio spike. Definitely seeing some differences stepping through the code. It seems faster overall (putting the data on the stack and then pop-sliding it). I will investigate later. If you have any pointers of where I should be looking at, please let me know.
The test file i'm currently using ends up being 328k big, so I'd love to also look into compression like you mentioned. A few days ago I've experimented with implementing a LZ77/78 style compression scheme (for another playback routine) that works on a command basis rather than byte basis . Rather than needing to compress and decompress the data, it relies on the routine's loop and referencing commands to deduplicate data, so other than some pointer manipulation it's fairly light on the CPU. I got decent results there, and will look into getting it working for this too.
Sorry for the long read :)
from lsdpack.
from lsdpack.
Related Issues (20)
- .vgm export support HOT 1
- stops at empty slot in savefile
- Idea: LZ77 compress command bytes HOT 1
- support older LSDJ version and littlefm HOT 4
- Assertion `false' failed in writer.cpp:283 HOT 2
- .gbs file is stuck
- feature request: raw register dump HOT 6
- generated .gbs files sound incorrect HOT 6
- player.o HOT 2
- rgbasm fails for player.s and boot.s for rgbds v0.5.1 HOT 1
- wave channel seems to pitch shift down after conversion HOT 1
- 'k' cmd kills all subsequent notes in wave channel HOT 1
- noise sound only works with optimizations disabled HOT 1
- cmake build problem on Debian HOT 1
- segfault when dumping HOT 8
- Best compatible LSDJ version and known quirks
- Aborted because song is longer than 1 hour despite HFF command being in place
- Optimize software envelopes HOT 2
- Static noise and flickering HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsdpack.