Comments (5)
Just some thoughts...
- Over the years, how many wads out there were created like this and will now trigger annoying errors? Is it too late to do something like this?
I'll admit it's a bit late to implement this, but as a mapper I use Chocolate Doom to check if a map/wad is Vanilla compatible. With how midi is treated at the moment, Chocolate Doom isn't exactly representative of how Vanilla Doom works.
This could result in future wads crashing in Vanilla Doom, as midis are constantly being made (or even older midis which I've had the format 0 issue more common) and if they are made incorrectly, the only way for a mapper to know if it works right is if they test it in Vanilla Doom via DOS.
I do think it'd be very useful to have this feature added to more modern testing ports like CRL.
- In the link above there is a hack/workaround mentioned where adding at least 3 dummy bytes avoids heap corruption and then the format 0 midi plays okay in vanilla Doom. How many authors used this hack? Should we detect this and allow these hacked midis to play?
I'll just mention that the way I fixed the midi was opening the format 0 midi in Sekaiju, where it would throw a "midi is format 0, would you like to convert to format 1?" message. I don't really know anything about any dummy bytes, and the only reason I was able to fix the midi for myself was because I work with and am used to writing midis.
- Should the format 0 midi detection be configurable?
No comment. I use Chocolate Doom as a testing tool more than actual playing.
from chocolate-doom.
I'll make a PR later. Some additional notes:
Only MUS supported (MIDI is silent):
- Doom 1.1, 1.2
Type 0 MIDI crashes game unless padded with 3 or more bytes:
- Doom 1.666, 1.8, 1.9
- Ultimate Doom 1.9
- Doom 2 1.666, 1.7, 1.7a, 1.8, 1.9
- Final Doom 1.9, 1.9 Anthology
- Heretic 1.0, 1.2, 1.3
- Hexen 1.0r1, 1.0r2, 1.1r1, 1.1r2
- Strife 1.0/1.1, 1.2, 1.3, 1.31
- Chex Quest
Error messages:
Z_CheckHeap: block size does not touch the next block
or
Z_CT at w.wad.c:510
from chocolate-doom.
So, should Chocolate Doom exit or print a warning when a format 0 midi is detected?
Printing a warning is not enough, we don't even enable console output on Windows. I think we should use I_Error()
.
from chocolate-doom.
Yeah, maybe I_Error()
is more appropriate.
Now, some other considerations:
- Over the years, how many wads out there were created like this and will now trigger annoying errors? Is it too late to do something like this?
- In the link above there is a hack/workaround mentioned where adding at least 3 dummy bytes avoids heap corruption and then the format 0 midi plays okay in vanilla Doom. How many authors used this hack? Should we detect this and allow these hacked midis to play?
- Should the format 0 midi detection be configurable?
This is why I didn't create a PR yet.
from chocolate-doom.
Over the years, how many wads out there were created like this and will now trigger annoying errors? Is it too late to do something like this?
A quick search in my collection shows that MIDI type 0 is only present in limit-removing or higher PWADs.
from chocolate-doom.
Related Issues (20)
- Emulate "2s middle textures do not animate in v1.2" HOT 1
- should chocolate-strife include the original intro video ? HOT 2
- Technically incorrect comment HOT 1
- Possible Z_Malloc error on playing demo under x64 build HOT 19
- Buffer overflow when loading response files HOT 6
- Windows build docs need a minor update (missing autotools package) HOT 1
- Sound Cut-Off Issue (FIXED) HOT 2
- snd_musiccmd option ignored (linux) HOT 8
- Sound problems (Heretic and Hexen) HOT 10
- no music with surround sound on HOT 5
- Configuration files directory differs from Vanilla Doom HOT 4
- Incorrect behavior for lost souls in Chex Quest with chex.deh HOT 1
- Setup using wrong color palette HOT 4
- Compilation Errors in Chocolate Doom on Debian: SDL2 and sound.c HOT 2
- Hexen: autosaves cause problems with -demoextend multi-level demos HOT 2
- Hexen: possible desync on multi-level demo (and now single map demo) HOT 12
- Heretic: Segfault in rooms3.wad HOT 7
- Add more gamepad binds to Heretic and Hexen #1666 - Dpad not being recognized HOT 6
- Someone needs to send a GPL compliance email to Husqvarna AB HOT 1
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 chocolate-doom.