Skip to content

Commit

Permalink
5.7.1.2 Updated VGMPlayer(only) to support MSXturboR DAC to play SEGA…
Browse files Browse the repository at this point in the history
… PCM, K053260, OKIM6285.
  • Loading branch information
110-kenichi committed Nov 2, 2024
1 parent dd549f1 commit f78a50d
Show file tree
Hide file tree
Showing 22 changed files with 591 additions and 45 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAmidiMEmo 5.7.1.1 Itoken (c)2019, 2024 / GPL-2.0
MAmidiMEmo 5.7.1.2 Itoken (c)2019, 2024 / GPL-2.0

*** What is the MAmidiMEmo? ***

Expand Down Expand Up @@ -274,6 +274,7 @@ e.g.) YM2151 has 8ch FM sounds, so you can play 8 chords on MIDI 1ch or sharing
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SNQ9JE3JAQMNQ)

*** Changes
5.7.1.2 Updated VGMPlayer(only) to support MSXturboR DAC to play SEGA PCM, K053260, OKIM6285.
5.7.1.1 Re-improved Hi-DPI screen handling.
5.7.1.0 Improved Hi-DPI screen handling.
5.7.0.0 Supported \*.mop\* file importing on TimbreManager.
Expand Down
Binary file modified src/VSIF/VGMPlay_MSX/VGM_msx.rom
Binary file not shown.
Binary file modified src/VSIF/VGMPlay_MSX/VGM_msx_Vkey.rom
Binary file not shown.
2 changes: 2 additions & 0 deletions src/VSIF/VGMPlay_MSX/const.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ OPN2WR2 = #0x17 ;:OPN2 ch4-6 data(W)
OPNAD = #0x12 ;:OPN ch1-3 address(W) / status(R)
OPNWR = #0x13 ;:OPN ch1-3 data(W)

TRDAC = #0xA4

WRSLT = #0x14
RDSLT = #0x0c
ENASLT = #0x24
Expand Down
4 changes: 2 additions & 2 deletions src/VSIF/VGMPlay_MSX/copy.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
if exist G:\ copy VGM_msx.rom G:\DATA\ROMS\
if exist F:\ copy VGM_msx.rom F:\DATA\ROMS\
if exist I:\ copy VGM_msx.rom I:\ROMS\
rem if exist F:\ copy VGM_msx.rom F:\DATA\ROMS\
rem copy VGMPlay_msx.rom \\192.168.1.66\DavWWWRoot
38 changes: 38 additions & 0 deletions src/VSIF/VGMPlay_MSX/macro.inc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ __WRITE_PSG_IO:
LD L,#0 ; ;Zero clear
JP (HL) ; 94
.endm

;=======================================================

.macro __WRITE_OPLL_IO
Expand Down Expand Up @@ -764,6 +765,43 @@ __WRITE_OPN2_DAC:
.endm
;=======================================================

.macro __WRITE_TR_DAC
__WRITE_TR_DAC:
LD C,#14 ; 7 14
LD B,#0 ; 7 14
0$:
;=======================
READ_DATA ; 55

LD A,B ; 5 60
OUT (PSGAD),A ; 12 72
LD A,D ; 5 77
OUT (TRDAC),A ; 12 89

; JOY2 Pin Read Mode
LD A,C ; 5 94
OUT (PSGAD),A ; 12 106
; Continuous Write
LD E,#0x1F ; 30 85
;=======================
1$:
IN A,(PSGRD) ;
AND #0x20 ;
JP Z, 1$ ;
IN A,(PSGRD) ;
AND E ;
CP E ;
JP Z,0$ ; ; Continuous Write

OR #JPOFST ;
LD H,A ;
LD L,#0 ;
JP (HL) ; 90 ; Jump to other ID
.endm
;=======================================================

;====================================================================
;(参考)P0/P2のBIOSコールを使わないスロット切り替えルーチン
;====================================================================
Expand Down
6 changes: 5 additions & 1 deletion src/VSIF/VGMPlay_MSX/uart-4800.asm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ tR_mode:
LD IY,(EXPTBL)
CALL CALSLT ;CALSLT

;PCM MUTE=OFF,ADDABUFF=SINGLE
LD A,#3
OUT (#0xA5),A

LD HL,#STR_TR
CALL STRPUT
JP endCheckCPU
Expand Down Expand Up @@ -349,7 +353,7 @@ __ENA_SCC:

;=======================================================
.ORG 0x7500
JP __VGM_LOOP ;
__WRITE_TR_DAC

;=======================================================
.ORG 0x7600
Expand Down
2 changes: 1 addition & 1 deletion src/VSIF/VGMPlay_MSX/uart-4800_p2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ __SELECT_SCC_SLOT:

;=======================================================
.ORG 0xB500
JP __VGM_LOOP ;
__WRITE_TR_DAC

;=======================================================
.ORG 0xB600
Expand Down
30 changes: 27 additions & 3 deletions src/VSIF/VGMPlay_MSX/uart-4800_p2.rel
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ A _HEADER214 size 3D flags 8 addr B300
S A$uart-4800_p2$211 Def00B300
A _HEADER215 size 3D flags 8 addr B400
S A$uart-4800_p2$215 Def00B400
A _HEADER216 size 3 flags 8 addr B500
A _HEADER216 size 43 flags 8 addr B500
S A$uart-4800_p2$219 Def00B500
A _HEADER217 size 3 flags 8 addr B600
S A$uart-4800_p2$223 Def00B600
Expand Down Expand Up @@ -788,8 +788,32 @@ T 35 B4 00 04 B4 F6 A0 67 2E 00 E9
R 00 00 17 00 00 03 17 00
T 00 B5 00
R 00 00 18 00
T 00 B5 00 C3 0E 90
R 00 00 18 00 00 04 02 00
T 00 B5 00
R 00 00 18 00
T 00 B5 00 0E 0E 06 00
R 00 00 18 00
T 04 B5 00
R 00 00 18 00
T 04 B5 00 26 10
R 00 00 18 00
T 06 B5 00
R 00 00 18 00
T 06 B5 00 DB A2 A4 C2 06 B5 DB A2 57 CB 22 CB 22
R 00 00 18 00 00 07 18 00
T 13 B5 00 CB 22 CB 22 1E 0F
R 00 00 18 00
T 19 B5 00
R 00 00 18 00
T 19 B5 00 DB A2 A4 CA 19 B5 DB A2 A3 B2 57 78 D3
R 00 00 18 00 00 07 18 00
T 26 B5 00 A0 7A D3 A4 79 D3 A0 1E 1F
R 00 00 18 00
T 2F B5 00
R 00 00 18 00
T 2F B5 00 DB A2 E6 20 CA 2F B5 DB A2 A3 BB CA
R 00 00 18 00 00 08 18 00
T 3B B5 00 04 B5 F6 A0 67 2E 00 E9
R 00 00 18 00 00 03 18 00
T 00 B6 00
R 00 00 19 00
T 00 B6 00 C3 0E 90
Expand Down
24 changes: 24 additions & 0 deletions src/VSIF/VGMPlayer/DacStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,18 @@ public void StreamSong()
byte bdata = (byte)((ddata >> 8));
parentSong.DeferredWriteOPNA_DAC(comPortOPNA, bdata);
}
else
{
foreach (var c in VsifManager.GetVsifClients())
{
if (c.SoundModuleType == VsifSoundModuleType.TurboR_FTDI && c.Tag.ContainsKey("ProxyOKIM6258"))
{
byte bdata = (byte)((ddata >> 8) + 128);
parentSong.DeferredWriteTurboR_DAC(c, bdata);
break;
}
}
}
pd.StreamIdx -= pd.StreamIdxDir;
pd.Oki6285Adpcm2ndNibble = true;
}
Expand All @@ -182,6 +194,18 @@ public void StreamSong()
byte bdata = (byte)((ddata >> 8));
parentSong.DeferredWriteOPNA_DAC(comPortOPNA, bdata);
}
else
{
foreach (var c in VsifManager.GetVsifClients())
{
if (c.SoundModuleType == VsifSoundModuleType.TurboR_FTDI)
{
byte bdata = (byte)((ddata >> 8) + 128);
parentSong.DeferredWriteTurboR_DAC(c, bdata);
break;
}
}
}
pd.Oki6285Adpcm2ndNibble = false;
}
}
Expand Down
35 changes: 23 additions & 12 deletions src/VSIF/VGMPlayer/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f78a50d

Please sign in to comment.