-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add emulated Serial MIDI synthesizer support #305
Add emulated Serial MIDI synthesizer support #305
Conversation
@@ -1088,6 +1168,18 @@ main(int argc, char **argv) | |||
#endif | |||
} | |||
|
|||
if (sf2_path && has_midi_card) { | |||
if (midi_card_addr < 0x9f60) { | |||
fprintf(stderr, "Warning: Serial MIDI card address must be in the range of 9F60-9FF0\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fprintf(stderr, "Warning: Serial MIDI card address must be in the range of 9F60-9FF0\n"); | |
fprintf(stderr, "Warning: Serial MIDI card address must be in the range of $9F60-$9FF0\n"); |
$9FF0 is in the middle of IO7, is that a typo? Might also be worth mentioning that that is IO3-IO6/IO7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way -midicard
's argument is parst does not handle $
, and such the error could be confusing when $
is given, unless we handle $
.
Also, the MIDI (and serial) cards only use half of an I/O range, 16 registers for two UARTs, so the IO range really doesn't apply as much as the second-to-least-significant nibble of the address.
break; | ||
} | ||
} | ||
fprintf(stderr, "Serial MIDI: Warning: improper LCR %d%c%d for UART %d, must be set to 8N1.\n", mregs[sel].lcr_word_length_bits, par, 1+(uint8_t)mregs[sel].lcr_stb, sel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is this warning geared towards? People developing MIDI software or regular users that look at their program output? If I read that message on a terminal, I'd have no idea what LCR is, or whom I should report that to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is meant for 6502 programmers trying to write software to talk to the MIDI card, and it means they got something wrong. I figure this is better than no message and no MIDI sound (which is what they'd get on hardware) or it works despite the wrong settings (which would lull the programmer into the false notion that they got it right)
This PR adds serial MIDI support