Ninja tap

Página 3/19
1 | 2 | | 4 | 5 | 6 | 7 | 8

Por aoineko

Paladin (1004)

imagem de aoineko

27-09-2022, 15:13

Manuel wrote:

Thanks! Did you also test whether it works with DM System 2 in openMSX?

No, but I use the driver included in DM-system 2 so don't imagine how it couldn't have the same behavior. ^^

BTW, I saw that a PCCM former member is still active on Twitter. I'll ask for original Driver. The one from DM-system 2 have some commented out code and I'm 100% sure it is the 'vanilla' one.

Por Manuel

Ascended (19469)

imagem de Manuel

27-09-2022, 20:08

Please try that first...

Por aoineko

Paladin (1004)

imagem de aoineko

27-09-2022, 23:12

I have updated my MSXgl sample program to add Ninja Tap data retrieval function (through repeated reading of the joystick port) and stored data reading function. The support for this device is supposed to be complete now (I will add some helper functions later).
The sample ROM (plain 32 KB) can be found here: https://github.com/aoineko-fr/MSXgl/raw/main/projects/sample...
I had to work almost blind since I don't have the device at home. I'm waiting for confirmation that everything is working well from the people who have this hardware.

Manuel wrote:

Please try that first...

I don't have the DM-system 2 binaries so I can't test them (if your "try that first" was about that ^^).

Por gdx

Enlighted (6219)

imagem de gdx

28-09-2022, 01:04

The link to the binaries is on the Wiki. (Download page -> DM-SYSTEM2 Utility Disk)

https://www.msx.org/wiki/Gigamix_DM-System2

Por Manuel

Ascended (19469)

imagem de Manuel

28-09-2022, 07:55

I believe the game Magical Labyrinth Remix uses Ninja tap, being based on DM System 2.

Por Jipe

Paragon (1614)

imagem de Jipe

28-09-2022, 08:39

i have the real magical labyrinth remix game bought with the ninja tap

with the copy in dsk and openMSX by entering the command: plug joyporta ninjatap

the ninja tap is well displayed in misc control of openMSX but how to connect the controllers because my xbox usb controller does not launch the game the push button

on a real MSX with the ninja tap the game works without problem

Por Danjovic

Champion (336)

imagem de Danjovic

28-09-2022, 17:47

Slightly different code to identify the Tap model and return the number of participants.

CHECKPLYRS:
; Return the number of players connected
; [E] None                     
; [R] C Tap connected info 
;     B number of players connected
	call CHECKTAPS
	ld b,0
	ld hl,TBPLRS
	add hl,bc
	ld b,(hl)
	ret
	
TBPLRS: ; unknown count as 1
   db  8,8,5,5,8,8,5,5,5,5,2,2,5,5,2,2

;   a1 a0 b1 b0   Tap a, Tapb   Count
;   0  0  0  0     4      4       8
;   0  0  0  1     4      4       8
;   0  0  1  0     4      1       5
;   0  0  1  1     4      1       5
;   0  1  0  0     4      4       8
;   0  1  0  1     4      4       8
;   0  1  1  0     4      1       5
;   0  1  1  1     4      1       5
;   1  0  0  0     1      4       5
;   1  0  0  1     1      4       5
;   1  0  1  0     1      1       2
;   1  0  1  1     1      1       2
;   1  1  0  0     1      4       5
;   1  1  0  1     1      4       5
;   1  1  1  0     1      1       2
;   1  1  1  1     1      1       2


CHECKTAPS:
; Return Ninja/Shinobi Tap info
; [E] None                     
; [R] C Tap connected info 
;      7  6  5  4  3  2  1  0               
;      0  0  0  0  a1 a0 b1 b0
;
;  a[1..0], b[1..0] : Status of ports A and B 
;  1 1 No Tap detected      ( no feedback on either pin 6 or 8)
;  0 1 Ninja Tap detected   ( feedback Pin 7 = ~Pin 8 )
;  0 0 Shinobi Tap detected ( feedback Pin 7 = ~Pin 6 . ~Pin 8)
;  1 0 Unknown/unexpected   ( feedback Pin 7 = ~Pin 6 )

; --write--  ---Pin 7 (read)-----
; PIN6  PIN8 No-Tap Ninja  Shinobi Unknown
;  LOW  LOW   HIGH   HIGH   HIGH    HIGH  
;  LOW  HIGH  HIGH   LOW    LOW     HIGH    -> to bit a1/b1   First Read
;  HIGH LOW   HIGH   HIGH   LOW     LOW    -> to bit a0/b0   Second Read
;  HIGH HIGH  HIGH   LOW    LOW     LOW   (can be disregarded)
; 
CKANYTAP:
	di            ; 
	ld c,0        ; 
	; port A
	ld de,0bf3ah  ; start with Joysel port A, pins 8=1, 7=1, 6=0 (read a1)
	call FBCHECK  ; return Cy = State of pin 7
    rl  c         ; c = 0 0 0 0 0 0 0 a1
	ld de,08f0fh  ; repeat with Joysel port A, pins 8=0, 7=1, 6=1 (read a0)
	call FBCHECK  ; feedback check at pin 7
    rl  c         ; c = 0 0 0 0 0 0 a1 a0
    ; port b
	ld de,0bf7ah  ; repeat with Joysel port B, pins 8=1, 7=1, 6=0 (read b1)
	call FBCHECK  ; return Cy = State of pin 7
    rl  c         ; c = 0 0 0 0 0 a1 a0 b1
	ld de,08f4fh  ; repeat with Joysel port B, pins 8=0, 7=1, 6=1 (read b0)
	call FBCHECK  ; feedback check at pin 7
    rl  c         ; c = 0 0 0 0 a1 a0 b1 b0
    ret           ; and B = B+1

;	
; Set bits on Joystick ports and return state of pin 7
; [E]  DE => Reg 15 bit mask, D = bit clear mask, E = bit set mask 
; [R] Cy = State of pin 7
;
FBCHECK:
    call PORSEL
	LD	A,14        ; select register 14 
	OUT	(0A0H),A
	IN	A,(0A2H)    ; read state of joystick port a = x x B A R L D U
	rla             ; a =  x B A R L D U, cy = x
	rla             ; a =  B A R L D U x, cy = x
	rla             ; a =  A R L D U x x, cy = B
	ret	
	

;======================================
; Sub Routine
PORSEL:	LD	A,15
	OUT	(0A0H),A
	IN	A,(0A2H)
	AND	D          ; bit clear mask 
	OR	E          ; bit set mask
	OUT	(0A1H),A   ; return A = state of Reg15 
	RET

Por Manuel

Ascended (19469)

imagem de Manuel

28-09-2022, 18:25

Jipe, the controller must be displayed in one of the ninjatap connectors. You can be sure by opening the console and typing: plug
That shows what is plugged in where.

Por Jipe

Paragon (1614)

imagem de Jipe

28-09-2022, 19:43

@Manuel
then type plug i have :
joyporta: ninjatap
joyportb:
printerport:
pcminput:
msx-midi-in:
msx-midi-out:
ninjatap_port_1:
ninjatap_port_2:
ninjatap_port_3:
ninjatap_port_4:
after typing plug ninjatap_port_1 joystick1
i see
joyporta: ninjatap
joyportb:
printerport:
pcminput:
msx-midi-in:
msx-midi-out:
ninjatap_port_1: joystick1
ninjatap_port_2:
ninjatap_port_3:
ninjatap_port_4:
but the game don't start
my xbox joystick work fine with other games then insert in joyporta

Por aoineko

Paladin (1004)

imagem de aoineko

28-09-2022, 21:54

The last version of the Ninja Tap's sample program for MSXgl have been tested on real hardware and everything works just fine: Device detection in both port and joysticks states reading.

Sample ROM can be found here: https://github.com/aoineko-fr/MSXgl/raw/main/projects/sample...

I used the driver I found in the あたっちゃって25% (quiz game) project.
I'm waiting for PCCM former member to get original driver, but the one I use "seems" original (I can't be 100% sure thay Gigamix didn't changed something).
Anyway, it work fine on real hardware.

I don't know why it doesn't work with OpenMSX, but I don't see what difference it would make to test DM-system 2 (by the way, I don't know what you want to test in this big library).
If I have a program that works well on real hardware and not on OpenMSX, there is an emulation problem.

Anyone else than Jipe have a real Ninja Tap to test my program? Danjovic?

EDIT: I check the driver used in Magical Labyrinth and it's exactly the same I'm using in MSXgl.

Página 3/19
1 | 2 | | 4 | 5 | 6 | 7 | 8