Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(opl3lpt): connect opl3lpt function to real code #109

Closed
wants to merge 5 commits into from

Conversation

jsmolina
Copy link
Contributor

@jsmolina jsmolina commented Oct 10, 2022

Fixes #71
I think it is almost ready to be there.
It's just missing a proper option for OPL3LPT in the sound settings, so the switch...case works.

So changes are:

  • move ADLIB_PORT to a variable instead of #define
  • use AL_SendOutputToPort_OPL3LPT for any AL_SendOutputToPort if port = parallel (it was the less intrusive way of this, but I am open to suggestions).
  • disable FM chip autodetection, as it's one of the first things the instructions of OPL3LPT for patching games.

missing:

  • I tried (temporarly) use case Adlib: so if user selects ADLIB on FDSETUP, it should set values. This is not working, I might have misunderstood the soundcard enum.
    I built the .exe file forcing the values and it worked properly, so it has something to do with the enum...
         AL_Stereo = TRUE;
         AL_OPL3 = TRUE;
         // LPT PORTS
         AL_LeftPort = 0x378;
         AL_RightPort = 0x378;
         ADLIB_PORT = 0x378;
  • add OPL3LPT (at least) option to FSETUP.
  • Only LP1 works, LPT2 is not supported yet, but I don't know how flexible it could be in the fdsetup.

I did first PR on my fork, but maybe it's better to share inputs here, isn't it?
jsmolina#2

@viti95
Copy link
Owner

viti95 commented Oct 12, 2022

I think the best idea is to add two new music devices to FDSetup (OPL2LPT and OPL3LPT, OPL2LPT should be very similar to OPL3LPT) and get the code to work with those new devices. This way we can set the parallel port we want to use instead of a fixed one, since there is already a variable for select parallel port on DSS and COVOX devices. I'll do that today, I haven't been able to do so this days as I've been on a small vacacion ^^

@jsmolina
Copy link
Contributor Author

I think the best idea is to add two new music devices to FDSetup (OPL2LPT and OPL3LPT, OPL2LPT should be very similar to OPL3LPT) and get the code to work with those new devices. This way we can set the parallel port we want to use instead of a fixed one, since there is already a variable for select parallel port on DSS and COVOX devices. I'll do that today, I haven't been able to do so this days as I've been on a small vacacion ^^

thanks!! that sounds great!!! and of course a vacation is always good 😃

@viti95
Copy link
Owner

viti95 commented Oct 12, 2022

I've added basic support for the two new music devices, don't know why the don't appear on this pull request https://github.com/viti95/FastDoom/tree/pr/jsmolina/109

@jsmolina
Copy link
Contributor Author

jsmolina commented Oct 13, 2022

it's like in another branch? no problem, I create a different pr 😄
#110

@jsmolina jsmolina closed this Oct 13, 2022
@jsmolina jsmolina deleted the feat-opl3lpt-integrated branch October 13, 2022 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opl3lpt support how?
2 participants