replace a system routine (midi)midi buffer

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

replace a system routine (midi)midi buffer

Postby charles » Sun Jul 29, 2018 1:09 pm

hi
I want to modify the midi buffer routine of the tos .
I can already install my own midi vector via kdbvbase

is it a part of kbdvbase I can't see?

I already can change the buffer using iorec
but I want to increase the size past 65536bytes

Charles
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
shoggoth
Nature
Nature
Posts: 952
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: replace a system routine (midi)midi buffer

Postby shoggoth » Sun Jul 29, 2018 1:36 pm

I think you may need to replace the CPU. Possibly you mat also need a different keyboard layout.

Make sure to have plenty of hot water available.
Ain't no space like PeP-space.

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: replace a system routine (midi)midi buffer

Postby charles » Sun Jul 29, 2018 1:43 pm

whew
so it requires major surgery huh?
Last edited by charles on Sun Jul 29, 2018 1:48 pm, edited 1 time in total.
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: replace a system routine (midi)midi buffer

Postby charles » Sun Jul 29, 2018 1:44 pm

but really is midisys from kbdvbase pointer to the vector I need to rewrite?
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: replace a system routine (midi)midi buffer

Postby charles » Sun Jul 29, 2018 1:47 pm

I can see it in st internals book
the cyilidrical buffer
just am leary on weather or not to start hacking into the tos.
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
edingacic
Captain Atari
Captain Atari
Posts: 257
Joined: Mon Sep 07, 2015 5:16 pm
Location: Austria
Contact:

Re: replace a system routine (midi)midi buffer

Postby edingacic » Sun Jul 29, 2018 2:42 pm

u are up to something special ?

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: replace a system routine (midi)midi buffer

Postby charles » Sun Jul 29, 2018 3:01 pm

yes , or atleast to my midi world I am
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: replace a system routine (midi)midi buffer

Postby charles » Tue Jul 31, 2018 10:04 pm

ive done its research
and written a beta ....
going to try some of my gear now which dumps over 65536bytes

see how it holds up ..
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

vinz6751
Retro freak
Retro freak
Posts: 13
Joined: Sat Nov 15, 2014 10:35 am
Location: France
Contact:

Re: replace a system routine (midi)midi buffer

Postby vinz6751 » Sun Aug 19, 2018 4:15 pm

Hello Charles

I am hacking in the same area because I am adding the possibility to have non-blocking Bconout(3) (send content of MIDI IOrect using interrupts)

The IOREC structure defines the ibuflen as a 16 bit, so the IOREC that the TOS manages can only handle 65535 bytes of buffer.
You have to hook into the midisys vector from the Kbdvec and do your own stuff there and store to some enhanced (32bit?) version of the IOREC structure.
Technically, the 2 ACIAS 6850 share the same IRQ number on the MFP, so the TOS already handles the interrupt and calls both handlers for the keyboard ACIA and the midi ACIA. The later is the midisys vector of the Kbdvecs. So it can be that it's called by you have nothing to read on the MIDI ACIA you have to check for that.

For reading you also have to hook into the Trap #X to detect and intercept Bconin(3) calls so to insert your code that will read from that enhanced IOREC. That's probably not very MiNT friendly though.

Note: do you really need IORECs that large ? I suppose you'll have an application reading these bytes and processing them "in real time" so the TOS's buffer (IOREC) "shouldn't" need to be too large, but the app's buffer may be.

Vincent

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: replace a system routine (midi)midi buffer

Postby charles » Sun Aug 19, 2018 5:13 pm

yes irq #6 is the midi acia interrupt #

to do non blocking bconout wht not just send data to $fffC06 ?

I don't need to read bconin because im on interrupt level ,
this means whatever comes in the port causes an interrupt and gets written directily to the midi buffer.
data will be stored in buffer at address -->iorec 14,2 + ibufadr|

ive written and presentily have a working model of this code ..large buffers as big as 3MB!!!!. : )

its because some dumps are larger than 65535 bytes
but what im worried about is maybe the newer midi devices might communicate at a different rate if so the Atari would need a new baud for midi ,,,? faster than 31250 kbps

should we talk privately and see if we can assit each other?

Charles
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

vinz6751
Retro freak
Retro freak
Posts: 13
Joined: Sat Nov 15, 2014 10:35 am
Location: France
Contact:

Re: replace a system routine (midi)midi buffer

Postby vinz6751 » Sun Aug 19, 2018 7:52 pm

Hi Charles !

WIth great pleasure ! I will update my skype profile then will be connected tomorrow !
About the non-blocking Bconout: you can only write one byte at a time in the data register of the ACIA, it will not queue them and you'd loose the previously written value. So you have to wait that the ACIA sends the byte, then raises an interrupt to say it's ready to send another one (there you'll pull another one from your IOREC/buffer).

The MIDI spec says the rate is 31250 bits per second, 1 start, 8 data, 1 stop, no parity. That has never changed and probably will never change (serial connection will be replaced with USB probably in the future). You can send data "as fast as connection allows", but be careful with System Exclusive message : many "old" synthesizers will not be able to swallow them fast enough, so you have either to add some configurable delay between bytes or between messages. For example, my TX-81Z and SY-77 require some delay between sysex messages.

20 years ago I wrote a small XDD for FreeMiNT 1.15.12. I am just getting back to Atari programming and just transfering the sources of 1.18.0 to my ST to see what changed and if I can revive it somehow :) I would like to try to make a program to use the ST as a synthesizer, using the soundchip as generator. I made some tries using Omikron basic to generate a saw wave (using the envelop generator with period depending on the note you play). You can make nasty effects, the ST can turn into a wicked solo synth ! Also tried generating FM samples it kind of works but needs speeding up, I thought I could create a program to generate sound and send them by MIDI Sample Dump to a sampler (I have a E-MU ESI 2000). Would also like to create an open source FreeMiNT-friendly sequencer, even if basic.

Will be happy to help or share :)
Vincent

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2407
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: replace a system routine (midi)midi buffer

Postby charles » Sun Aug 19, 2018 9:40 pm

vince I sent a msg to your email
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 1 guest