Closed Pawlicker closed 2 years ago
It works and plays for me.
https://user-images.githubusercontent.com/452325/166557891-01c23a19-e350-420a-bc0e-3b9444c0fffb.mp4
edit: On the video link, loading of Music Disk Volume 8 starts from 37 seconds, before the intorduction is assembled.
This part is definitely not from PC98.
https://user-images.githubusercontent.com/452325/166565744-37b4dbe5-5db6-452c-8673-275a3be45b50.mp4
It works and plays for me.
edit: On the video link, loading of Music Disk Volume 8 starts from 37 seconds, before the intorduction is assembled.
This part is definitely not from PC98.
The bat file calls an opening demo (md8op.com) before loading the player itself. On the real machine this is how it looks. The same applies if you run the music disk under NP21w.
I booted this disc (volume 8) under Neko Project 21/W and indeed the intro looks just like the videos you link to. Sorry for the confusion.
The startup batch FMPD8.BAT
contains the following commands.
fmp r
fmp s -#29 -vf00 -vs00 -vr00 -vp00 -vz00 -s -cx -d$0
ppz8 s -i00 -b08 -aw61 -d3
chkppz8
if errorlevel 1 goto PPZ
chk_ems /e88
if errorlevel 1 goto NO_EMS
play pl.ozi /c /d
md8op /c
goto PLAY
:PPZ
ppz s /w /m0
:PLAY
md8
fmp r
goto END
:NO_EMS
:END
There seems to be a error under dosbox-x when checking chkppz8
and the boot sequence without an intro follows.
You can force this intro. Close the player.
Enter these commands.
fmp s -#29 -vf00 -vs00 -vr00 -vp00 -vz00 -s -cx -d$0
md8op /c
After playing it, the system locks up.
https://user-images.githubusercontent.com/452325/166802627-2742d520-07c8-432b-a7c4-39c92fd0fe56.mp4
FMP incorrectly detects "86board" as "Speak Board", therefore, ppz8 complains that there are no 86board. On np21/w, if you switch the sound board to "Speak Board", the same occurs.
For your interest, PPZ.com is a 3ch PCM driver using PSG. https://www.vector.co.jp/soft/dos/art/se003768.html
PPZ8.com is a 8ch PCM driver using 9801-86 board or WSS PCM feature. https://www.vector.co.jp/soft/dos/art/se022226.html
I think implementing the Sound ID (I/O 0xa460) is required to announce the presence of 86PCM. (Or WSS, because PPZ8 also supports it)
FMP first tries reading from the Sound ID to see if it has a 86 card or equivalent, and then falls back to probing to detect pre-73/86 or third-party cards, and detects a Speak Board (OPNA w/ ADPCM DRAM) when it sees an OPNA. But PPZ8 probably only tries Sound ID because it's looking for a linear and streaming PCM.
@myon98 Thanks for your information. According to this page, Sound ID is as follows. https://www.mfp.gr.jp/users/takas/prog/wssmix.html
Sound ID is an ID describing PCM capability of NEC sound cards, and is stored in the upper 4bits of port A460. It is shared with OPNA mask flag which are the lower 2bits. Sound ID of 86 board 4 : when using port 188h 5: when using port 288h
Edit: I found the code which returns Sound ID 4. Strange that it isn't effective? Excerpted from pcm86io.c
static REG8 IOINPCALL pcm86_ia460(UINT port) {
(void)port;
return(0x40 | (pcm86.extfunc & 1));
}
I'm not fully familiar with the code structure yet, but I don't see that function being referenced anywhere else. Maybe it just needs a call to cbuscore_attachsndex
to register the port, but I'm not sure whether other aspects of 86PCM (that looks like it's from NP2) is integrated into dosbox-x or not yet. I'll probably try looking into it.
It seems like many parts of 86PCM has not been ported yet, many parts of pcm86c.c are commented out and pcm86io.c is not compiled at all. I might try integrating it but I'm not really sure.
Also in my experience PPZ8 doesn't do really well under the timing characteristics of emulators. Maybe dosbox-x is different in this aspect but I'm not really sure. Perhaps presenting a virtual PPZ8 interrupt interface that gets implemented by the host might be desired for the best quality? (jk)
I haven't gone deep in to the code, but assuming you're right, it may explain issue #2970 as well. (The Opening PCM song in Harlem Blade doesn't play)
For experiment, I added a code to always return Sound ID=4.
FMP.com recognizes the sound card as 86 board, but PPZ8 freezes on loading.
The log says Invalid opcode or unhandled PC-98 STOP key interrupt 06h
So, I think we need to fix some code of PCM feature.
Update on my previous comment. I forgot to boot MS-DOS before loading the demo. If I do so, it successfully loaded PPZ8.com as well.
I refered to Undocumented 9801/9821 Vol.2 for which I/O ports to add. https://www.webtech.co.jp/company/doc/undocumented_mem/io_sound.txt Added ports are A460, A466, A468, A46A, A46C A66E. All values returned are dummy data. (Maybe we don't need all)
I uploaded the hack(patch) on my repository commit 348484bd6fc06819e122cd88f4a0171b7155dc2e I know I shouldn't but since I don't know how to add I/O port address from scratch, I amended timer.cpp, which has some I/O port access. I hope someone can add this in a more neatly and in a way it should be.
I attach a video, something went wrong with the size, but at least you can see it working.
Edit:The link to the reference material was wrong, so I fixed it.
I confirm. Well done. With your patch (hack) now "FMP Music Disk Volume 8" starts with the intro under DOSBox-X.
Code of Conduct & Contributing Guidelines
Have you checked that no other similar bug report(s) already exists?
Edit: #1138 is about special fully-nested mode as well.
What operating system(s) this bug have occurred on?
KDE Neon, 5.13.0-40-generic #45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
What version(s) of DOSBox-X have this bug?
0.83.25 SDL2 Linux64
Describe the bug
FMP Music Disk Volume 8 (DL link here) does not show the intro that normally plays when the disk is loaded on a real machine or Neko Project 21w. Instead it loads jumps right to the fake POST screen part of the intro and dumps a bunch of errors in the console before loading the rest of the software.
Expected behavior
Here's a video of the intro playing, before the fake POST screen and loader kicks in. https://www.youtube.com/watch?v=gL0mUtGrhHA
Steps to reproduce the behaviour
Used configuration
Emulator log
Additional context
No response