UzixLS / zx-midiplayer

MIDI player for ZX Spectrum
GNU General Public License v3.0
14 stars 1 forks source link

New output option for ZX Spectrum Next UART #4

Closed sfh-soem closed 1 week ago

sfh-soem commented 2 weeks ago

Hello,

thank you for this great MIDI file player. I would like to use the program on a ZX Spectrum Next. Unfortunately, the existing output options do not work here. However, the ZX Spectrum Next has a built-in UART that can be used for MIDI. I have extended your current source code from today (master branch): In the output menu there is now the option "ZX Next UART". The file "nextuart.asm" contains the additional code for initializing the UART and outputting a byte to the UART. The program runs perfectly on my Spectrum Next with this extension. Would you integrate the additional code into the project?

Greetings, Scott-Falk Huehn zx-midiplayer-update.zip

UzixLS commented 2 weeks ago

Hello. Thank you for contribution. I reviewed your code and suggest to remove nextuart_flush_txbuf and nextuart_putc_txbuf. txbuf is only required by uart.asm to not miss interrupts, as during byte transmission uart.asm doing DI/EI. With txbuf in most cases all transmissions take place just after interrupt occurs.

Also I have a few questions: 1) As far as I know, ZX Spectrum Next development team ignores TR-DOS existense and doesn't support loading software in TRD format. How do you load midi player? 2) How do you connect MIDI synthesizer to Next? Or it's have builtin (in Raspberry Pi)?

sfh-soem commented 2 weeks ago

Hello, I wasn't sure whether nextuart_flush_txbuf and nextuart_putc_txbuf are absolutely necessary. With Next, the interrupts do not have to be turned off during transmission.

Your questions:

  1. The Next can be turned into a Spectrum 128 (or +2/+3), which offers support for ESX-DOS and DivMMC. This provides a TR-DOS emulation and it is possible to start and run TRD images. But I've taken a different path: I assembled the code with your make file, then you also get a TAP and a SNA file and you can run them directly in Next mode.
  2. I have developed a MIDI interface for the Next: Next MIDI Box (unfortunately only with a German description). This interface is directly connected to the UART and allows the connection of any MIDI instruments. For example, I use a Roland Sound Canvas.

Greetings, Scott-Falk Huehn

UzixLS commented 2 weeks ago

Thanks for clarification. I modified your driver to get rid of txbuf, can you check this build? build.zip

sfh-soem commented 2 weeks ago

Hello, I tested all variants on the Next, the TRD in 128k mode and the TAP/SNA in Next mode. It works great 👍

UzixLS commented 2 weeks ago

Commited 2c7939ad8606054cd8dc3536b5d8392c14fb3b6d

sfh-soem commented 2 weeks ago

Hello,

thank you very much. What is the current version of the player? I need this information to build the code, but I couldn't find it anywhere.

Greetings, Scott-Falk Huehn

Am 28.08.2024 um 14:15 schrieb Eugene Lozovoy:

Commited 2c7939a https://github.com/UzixLS/zx-midiplayer/ commit/2c7939ad8606054cd8dc3536b5d8392c14fb3b6d

— Reply to this email directly, view it on GitHub https://github.com/ UzixLS/zx-midiplayer/issues/4#issuecomment-2315162084, or unsubscribe https://github.com/notifications/unsubscribe-auth/ APLSCKM6FE2PWN7MOK3VOO3ZTW5OBAVCNFSM6AAAAABNEQECHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJVGE3DEMBYGQ. You are receiving this because you authored the thread.Message ID: @.***>

UzixLS commented 2 weeks ago

Current released version is still 3.0. Current version in git is 3.4. Minor number is automatically generated as number of commits after previous release.