Turbo-r disable pauze button

By Daemos

Paragon (1718)

Daemos's picture

14-06-2020, 19:19

This can be done but found no documentation of this. Manbow2 does do this. The pauze button does not work and this is in z80 mode. Anyone have a clue?

Login or register to post comments

By Pencioner

Scribe (1136)

Pencioner's picture

14-06-2020, 19:20

Does Manbow 2 keep interrupts disabled all time? Wink

By zeilemaker54

Champion (278)

zeilemaker54's picture

14-06-2020, 22:02

Turbo-R pause key is handled by the interrupthandler of the MSX bios.
If a custom interrupt handler is installed which does not return control to the bios interrupthandler, the pause key will lose its function.

By Daemos

Paragon (1718)

Daemos's picture

14-06-2020, 23:49

For the r800 yes the z80 however is hardware pauzed. I have once seen a snippet of code outing something to the s1990 or similar chip disabling the pauze button rendering it unusable even in z80 mode.

By max_iwamoto

Champion (486)

max_iwamoto's picture

15-06-2020, 00:01

Daemos wrote:

For the r800 yes the z80 however is hardware pauzed. I have once seen a snippet of code outing something to the s1990 or similar chip disabling the pauze button rendering it unusable even in z80 mode.

Why not look inside Manbow 2 code?

By zeilemaker54

Champion (278)

zeilemaker54's picture

15-06-2020, 07:43

zeilemaker54 wrote:

Turbo-R pause key is handled by the interrupthandler of the MSX bios.
If a custom interrupt handler is installed which does not return control to the bios interrupthandler, the pause key will lose its function.

https://sourceforge.net/p/msxsyssrc/git/ci/master/tree/base410/bios.mac#l4864

; Subroutine KEYINT
; Inputs ________________________
; Outputs ________________________
; Remark Entry at the same adres as MSX1

J0C3C: PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
EX AF,AF'
PUSH HL
PUSH DE
PUSH BC
PUSH AF

; Changed from orginal
; Reason: expansion of interrupt routine to handle MIDI ints

; MSX1 and above have:
IF MSXMID EQ 0

PUSH IY
PUSH IX

ELSE

; Turbo-R with MIDI has:
JP J1A70 ; expansion code
NOP

ENDIF

; End of change

J0C4A: CALL H.KEYI
; Changed from orginal
; MSX1 and above have:
; IN A,(099H)
; AND A

; Turbo-R has:
JP J1A0B ; expansion code

J0C50: JP P,J0D02
CALL H.TIMI

....
....

; Subroutine patchroutine for supporting PAUSE key
; Inputs ________________________
; Outputs ________________________

J1A0B: IN A,(99H)
AND A ; orginal code at patchlocation
EX AF,AF'
IN A,(0A7H)
RRCA ; read pause key
JR NC,J1A2D ; not pressed, quit
LD A,(CASPRV)
OR 01H
OUT (0A7H),A ; pause led on
LD A,01H
OUT (0A5H),A ; sound off
J1A1F: IN A,(0A7H)
RRCA
JR C,J1A1F ; wait until pause key pressed again
LD A,(CASPRV)
OUT (0A7H),A ; pause led off
LD A,03H
OUT (0A5H),A ; sound on
J1A2D: EX AF,AF'
JP J0C50 ; resume orginal routine

By Daemos

Paragon (1718)

Daemos's picture

16-06-2020, 12:24

Its bit 1 in register #a7

Xor a or ld %10000000
Out (#a7), a

Voila pauze button trashed

By zeilemaker54

Champion (278)

zeilemaker54's picture

16-06-2020, 16:57

Daemos wrote:

Its bit 1 in register #a7

Xor a or ld %10000000
Out (#a7), a

Voila pauze button trashed

I can not verify this behaviour, because I do not have the real thing. But I am pretty sure that konami does not use this approach, as it is agains the msx rules to write to these i/o ports directly. So my guess (without actually disassembling the rom) is that konami is using the H.KEYI hook and implement their own interrupthandler.

By Grauw

Ascended (9156)

Grauw's picture

16-06-2020, 17:55

Manbow2 is made by norakomi, not Konami Smile.

The bit is emulated by openMSX and I’ve updated the documentation on the MAP.

By zeilemaker54

Champion (278)

zeilemaker54's picture

16-06-2020, 19:59

Grauw wrote:

Manbow2 is made by norakomi, not Konami Smile.

The bit is emulated by openMSX and I’ve updated the documentation on the MAP.

Oops, did a false assumption on Manbow2 created by Konami. Thanks for pointing this out, Grauw.