Kill off interrupts on the MTX

Everything about programming, including VDP and Sound programming.
Post Reply
Potholepete
Posts: 83
Joined: 11 Aug 2012 22:13

Kill off interrupts on the MTX

Post by Potholepete »

I am currently playing around with Envosound in an attempt to get it usable as a sound engine for any new MTX games that people may want to develop and are looking for a good sound engine to use. It uses a single interrupt to control all 4 channels, The issue I have is that once I run the program it will exit out of the assembler and be ready for editing again BUT as the interrputs are still going it usually crashes the MTX if I alter anthing that moves the code about. Does anyone know the best way to kill off interrupts to enable safe editing after you have run the program?

10000 LET A=USR(2545)
10010 STOP
this was suggested but sadly does not work.

Interrupts set up like this:

SETINT: LD HL,INT ;THIS IS THE START OF THE INTERRUPT CODE FOR ENVOSOUND
4473 LD (#FFF2),HL ;SETS THE JUMP LOCATION FOR THE INTERRUPT TO JUMP TO IN MEMORY
4476 LD A,3
4478 OUT (9),A
447A OUT (9),A
447C LD A,165
447E OUT (9),A
4480 LD A,70
4482 OUT (9),A
4484 EI
4485 RETI

Resolve this would really help as atm you will have to reload it back in each time you want to edit it. With the MFX that is no issue but with tape its over a minute each time.
Bill B
Posts: 596
Joined: 26 Jan 2014 16:31

Re: Kill off interrupts on the MTX

Post by Bill B »

Potholepete wrote: 27 Jun 2023 21:09 10000 LET A=USR(2545)
10010 STOP
this was suggested but sadly does not work.
I think somebody must have got the HEX to DEC conversion wrong. Try:

Code: Select all

10000 LET A=USR(2431)
10010 STOP 
Or perhaps:

Code: Select all

10000 LET A=USR(2431)
10010 LET A=USR(2445)
10020 STOP 
From the ROM source:

Code: Select all

097F F3           ijinit:         DI
0980 ED 5E                        IM      2
0982 3E FF                        LD      A, 0FFH
0984 ED 47                        LD      I, A
0986 3E F0                        LD      A, 0F0H
0988 D3 08                        OUT     (08H), A
098A 3E 03                        LD      A, 03H
098C D3 08                        OUT     (08H), A
098E D3 09                        OUT     (09H), A
0990 D3 0A                        OUT     (0AH), A
0992 D3 0B                        OUT     (0BH), A
0994 ED 4D                        RETI
0996 F3           init125:        DI                            ; Configure 1/125s Interrupt
0997 E5                           PUSH    HL
0998 21 80 07                     LD      HL, vdpint            ; Initialise interrupt vectors
099B 22 F0 FF                     LD      (IJTABLE), HL
099E 21 11 1C                     LD      HL, enterin
09A1 22 F4 FF                     LD      (IJTABLE+4), HL
09A4 E1                           POP     HL
09A5 3E A5                        LD      A, 0A5H               ; Enable interrupts, timer, 256 pre-scale
09A7 D3 08                        OUT     (08H), A
09A9 3E 7D                        LD      A, 7DH                ; Time constant
09AB D3 08                        OUT     (08H), A
09AD FB                           EI
09AE ED 4D                        RETI
2431d = 97Fh
2454d = 996h
Potholepete
Posts: 83
Joined: 11 Aug 2012 22:13

Re: Kill off interrupts on the MTX

Post by Potholepete »

will try it now and report back :-)
Potholepete
Posts: 83
Joined: 11 Aug 2012 22:13

Re: Kill off interrupts on the MTX

Post by Potholepete »

So it looks like your second option worked, the 1st one did the same as the one I listed, basically did not seem to stop the interrupts.

so for anyone looking for a quick and easy way to kill off interrupts for editing etc uses Bills method below.

10000 LET A=USR(2431)
10010 LET A=USR(2445)
10020 STOP

Thanks again Bill

J
Martin A
Posts: 802
Joined: 09 Nov 2013 21:03

Re: Kill off interrupts on the MTX

Post by Martin A »

Potholepete wrote: 27 Jun 2023 21:50 So it looks like your second option worked, the 1st one did the same as the one I listed, basically did not seem to stop the interrupts.

so for anyone looking for a quick and easy way to kill off interrupts for editing etc uses Bills method below.

10000 LET A=USR(2431)
10010 LET A=USR(2445)
10020 STOP

Thanks again Bill

J
um,

Code: Select all

10000 LET A=USR(2431)
10010 LET A=USR(2454)
10020 STOP 
might be better. 2445 is 098D in hex, and jumps into the middle of the OUT (08H), A instruction.

But it does show why not having a built in hex to decimal function is a minor irritation with the MTX.
User avatar
gunrock
Posts: 248
Joined: 28 Oct 2020 21:17

Re: Kill off interrupts on the MTX

Post by gunrock »

What is Envosound? An old type-in music player from days of old?
Steve G
Danish Memotech MTX 512, MFX and loving it
Bill B
Posts: 596
Joined: 26 Jan 2014 16:31

Re: Kill off interrupts on the MTX

Post by Bill B »

Martin A wrote: 27 Jun 2023 23:23 um,

Code: Select all

10000 LET A=USR(2431)
10010 LET A=USR(2454)
10020 STOP 
might be better. 2445 is 098D in hex, and jumps into the middle of the OUT (08H), A instruction.

But it does show why not having a built in hex to decimal function is a minor irritation with the MTX.
I always was slightly dyslexic, prone to transposing letters or digits :(
Martin A
Posts: 802
Joined: 09 Nov 2013 21:03

Re: Kill off interrupts on the MTX

Post by Martin A »

gunrock wrote: 27 Jun 2023 23:31 What is Envosound? An old type-in music player from days of old?
It was the sound effects and music player used in Downstream Danger and Rolla Bearing
User avatar
gunrock
Posts: 248
Joined: 28 Oct 2020 21:17

Re: Kill off interrupts on the MTX

Post by gunrock »

Ah, thanks. Rolla Bearing had some nice FX and an interesting title tune
Steve G
Danish Memotech MTX 512, MFX and loving it
Post Reply