-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added missing functions in C-port #3
Conversation
…port driver to enable potential 64bit port of driver.
…ike Visual Studio 6 and on Visual Studio in general
I will fully check when I get at home. Some method to the madness/laziness: /src/crud/* was once /src/*, but I pushed the code off the desk into the trashcan and didn't quite have the heart to discard it. Perhaps I could have used a branch instead. Now for nitpicks. /src/esfm.c should remain dependency neutral and written with stdint. It is intended to be a lib that one may use for whatever. Maybe a driver with real hardware, maybe usermode midi plugin paired with softemu(such as https://github.com/Kagamiin/ESFMu when it gets completed). Thirdly, I see you have made MSVC6 makefile/project files. I would have to maintain those or they will fall into bitrot. Fourth, are you aiming for creating a whole windows driver?
Thus, if such a driver is desired, then perhaps linux has better codebase(minus the proprietary ESFM bit; they have OPL3 mode midi). What are your thoughts? |
Thanks for your comment. As for QPCuWait:
So as your code is to be compiled on Windows, I thought that I should also the same instrnsics that you used. So I was mistaken and should use the QPCuWait from main.c instead? As for the stdint.h, I understand, as stdint.h was not available under VC6. I can revert this back to stdint.h, and include some defines that define the stdint types on The msvc6 Makefiles are just there to test the code a bit, you can compile the sources with whatever compiler you want. It was mainly for the to make my life easier but not having to mess around with MinGW horrors. I can crate my own repository for the driver, of course. Just wanted to contribute my IDA-Databases und RE-results to your project, as I was under the impression that you wanted to make a C-Port of the now-working ASM player. Do the mentioned bugs in the driver also occur on NT4 or just with the Miniport driver in Win2k/XP? |
Lettuce see... This user that says only win9x/os2 has required midi functionality and not nt4 driver... he should be redirected to this repository and describe the differences in implementation. I would be very interested. QPCuWait from main.c, yes. Sorry for shitting duplicate code around... Yes, I want C port of the asm player. Though, know that I've botched my asm port as per issue #1. The NT4 driver does not have the tone porta midi bug like the win2k/xp one. I have not used it enough to know how well it handles recording and playback of pcm audio. |
Follow the outline portayed in /src/esfm.asm and /src/esfm.c |
I can lend my pci sound card to you. |
That should work, my mainboards still have PCI ports. If I need an ES1989S, you'd have to pay for the shipping costs to Austria forth and back, I see that a used card incl. shipping is around 40$ on eBay, so depending on your location, this may also be an option. |
ᴇꜱ1938 series cards were adverting the said |
https://gist.github.com/discatte/a7aacd0e46233846f17af77be9c22903 Edit: oops, product listing older than product! Lettuce google... ES1989S: I don't think so |
Hm, both are not listed in the sheet you provided? But I read on data sheet https://www.alsa-project.org/files/pub/datasheets/ess/DsSolo1.pdf
As the ES1938S is "Solo-1", I guess it should work, so I can test if I get it running on an x64 machine? |
They won t run as is on Windows. |
Well, that's why we want to write a driver for them, right? |
Correct. Though pcm is just playing 44Khz at 16Bits. Today, even a 10 years old notebook works at 64 bits with 128Kb/s per second. You better have to broadcast sound to your phone (effort doesn t worth it). It s just for esfm and midi. |
…d with x64 compatible GiveIO driver. Now using WINDDK compatible READ_PORT/WRITE_PORT commands to facilitate using code later in Kernel-mode driver and importing pseudocode-functions from IDB.
es1969.sys.idb is newer version than IDA 6.8. Thus cannot be opened on my end. |
I am introducing functions one by one, from /src/crud/essfm.c, into /src/esfm.c. The results are mixed... I will push back into your driver branch as I go. |
Unfortunately I don't know a way how to backport an IDB, but 6.8 didn't have Undo-function is Decompiler, which is very frustrating. I tried exporting IDC and import in IDA 6.8, but it doesn't know most directirives, as it seems, so this is also a dead-end. I can export a pseudocode .c and .h for the structure definitions, if that is helpful. Testing and fixing my ported functions sounds good, so pushing the fixes back would be fine. Let's see how many mistakes I made ;-) |
…Bend, MidiCalcFAndB, !!note_on, note_off.
The !! functions in commit message are borked from my trials. I have assumed that calling convention is STDCALL. |
It's maddening, because, porting code to C introduces bugs over the original ASM port, which introduced at least 2 or 3 bugs over the original replayer. |
STDCALL should be correct, AFAIK it's the standard Calling Convention on Windows anyway. |
I throw midis at the damned thing until "something is off". I then compare between latest rev, an earlier rev, and the XP driver's built-in implementation. |
Maaaan, that branch merge at the end really twists my bollocks. |
…else warped during the merge commit.
Ooops, did I do something wrong? I just pulled the branch (otherwise I wouldn't have been able to push the commit) and then issued the commit with the fix, seems it automatically created the merge by thoing this...? |
Dog knows what happened. But I am glad it's gone now. |
I don't have such a soundcard myself, so I cannot test anything, but hopefully the C-port works, please check.
Just made a MSVC6 .dsp project file, you may want to make your own makefile for building it.