Posts: 720
Threads: 103
Joined: Apr 2022
Reputation:
14
(09-03-2022, 03:29 PM)mnrvovrfc Wrote: (09-03-2022, 03:25 PM)madscijr Wrote: (09-03-2022, 03:19 PM)mnrvovrfc Wrote: "DECLARE" is not needed in QB64 unless you define routines in mixed-language programming, such as the "direntry.h" file contributed by Steve. Otherwise is what I told you and what @Jack told you LOL, it uses "CALL ABSOLUTE" to load up assembly which works in 16-bit but not in our present time. Would have to run that code in M$QB or QBasic inside DOSBOX or something like that.
Ah, thanks. I don't see any inline assembly code around that GetIntVector, but this being old QuickBasic (or is it classic VB?) code, from the 32 or 16-bit era, we may want to check all the variable types and make sure they are updated for QB64 & modern 64-bit PCs?
UPDATE: I just saw your earlier answer above. Yeah, the whole module probably needs to be updated or reworked for modern 64-bit Windows compatibility... Maybe it's not worth the effort. We have to try something else.
From this page:
https://qb64phoenix.com/qb64wiki/index.php/INTERRUPT
Registers are emulated in QB64 and there is no support for intNum 33h mouse functions above 3 or intNum requests other than 33.
If the routine has to do "INT 21h" which was the popular MS-DOS interrupt it wouldn't work, either with "CALL ABSOLUTE" or with "CALL INTERRUPT". I don't know if an MS-DOS interrupt needed to be called to generate sound, that's new to me...
Is this stuff necessary for reading & writing MIDI files or is it more for playback or other functionality outside of that? Again, not at my PC to really look, but for my purposes at least, all I need is to read & write MIDI, the other stuff can be done however. For playback, I'm just fine with shelling out to WinAmp even
Posts: 1,587
Threads: 59
Joined: Jul 2022
Reputation:
52
(09-03-2022, 04:49 PM)madscijr Wrote: Is this stuff necessary for reading & writing MIDI files or is it more for playback or other functionality outside of that? Again, not at my PC to really look, but for my purposes at least, all I need is to read & write MIDI, the other stuff can be done however. For playback, I'm just fine with shelling out to WinAmp even Somebody else wanted to play MIDI files, with an application created from a BASIC programming system, even more than you did. It was @TempodiBasic trying to help out. He posted information about the "QMIDI" program and others including me commented about it. It was out of this post:
https://qb64phoenix.com/forum/showthread...82#pid6182
Posts: 344
Threads: 24
Joined: Jul 2022
Reputation:
20
Hi
@MadSciJr
don't matter about DECLARE that are needed for QBasic and not for QB64!
@ for all interested friends
Now I have had time to look into code of QMIDI.BAS....
it is clear that :
1 it had been used ASM in QBasic by Call Absolute!
2 it is clear that the authors claim some OS drivers that managed the MIDI files for playing them
-- so the most interesting part of code is a long list of Hex(ASM) code valid for the OS that supports Interrupt at 16/32 bits.
Nothing to use today at 64 bits.
Well
the first question is
DOS had MIDIDrivers, and so Windows? Linux? MacOs?.... Is the program, that we must build to read MIDI, translate it to NMN of Jean Jacques Rousseau or SMN (classical pentagram) for a CSV file to edit or to pass to an editing program, translate back text file (both NMN both SMN) to MIDI playable, OS indipendent? Or must it call a library that is different for different OSes?
this article tells about MIDI drivers but I think that those drivers are about an hardware MIDI tool that let you play your musical instrument and record it as MIDI file.
https://docs.microsoft.com/en-us/windows...components
the second question is
if it is so (we need drivers to play MIDI files), was it useful to get from freebasic program the way to convert MIDI to PLAY instructions and viceversa?
but taking a look into it, it seems not so helpful than I was hoping.
So it remains the VB6 project of Utah that gives us sufficient informations to build our MIDI2txt translator for file MIDI with 1 track.
And we need informations about multitrack MIDI file's structure.
Let's go to collect more informations from your sources and from web!
Posts: 344
Threads: 24
Joined: Jul 2022
Reputation:
20
@SMcNeill
yes Steve I yhink you're right, it seems a clone of Qbasic MKL$!
Posts: 1,001
Threads: 50
Joined: May 2022
Reputation:
27
If you put brackets around it, are there fewer mistakes.
Posts: 720
Threads: 103
Joined: Apr 2022
Reputation:
14
(09-04-2022, 06:10 PM)Kernelpanic Wrote: If you put brackets around it, are there fewer mistakes.
One thing I learned in VBA is, if you're calling a routine that doesn't return a result (a sub), like
mySub(param1, param2, param3)
then leave off the parentheses:
mySub param1, param2, param3
if you want the parentheses, then put Call before the routine name:
call mySub(param1, param2, param3)
I'm not sure if this makes a difference in QB64, but in VBA, the IDE doesn't complain about the syntax that way...
Posts: 1,587
Threads: 59
Joined: Jul 2022
Reputation:
52
Posts: 1,001
Threads: 50
Joined: May 2022
Reputation:
27
Posts: 1,587
Threads: 59
Joined: Jul 2022
Reputation:
52
All right, you forced me to say it. Didn't you read the two pages before this one and especially what I posted and what @Jack said?
The source code doesn't work on QB64 on 32-bit and 64-bit computers because it uses "CALL ABSOLUTE". It builds up a string which is supposed to be machine language for 16-bit and then relies on an ancient routine loaded as QB.QLB by QuickBASIC, or by QBasic to "execute" it. QB64 could only emulate the mouse driver and probably very little else, out of doing such outdated stuff. Sadly, it prevents QB64 from being "100% compatible" while some people insist on throwing it any program that was created with QB or PDS...
There's nothing to do with "QMIDI" except getting DOSBOX or something like that and actually using QB or QBasic to run it.
Posts: 720
Threads: 103
Joined: Apr 2022
Reputation:
14
09-04-2022, 08:21 PM
(This post was last modified: 09-04-2022, 08:24 PM by madscijr.)
(09-04-2022, 07:09 PM)mnrvovrfc Wrote: All right, you forced me to say it. Didn't you read the two pages before this one and especially what I posted and what @Jack said?
The source code doesn't work on QB64 on 32-bit and 64-bit computers because it uses "CALL ABSOLUTE". It builds up a string which is supposed to be machine language for 16-bit and then relies on an ancient routine loaded as QB.QLB by QuickBASIC, or by QBasic to "execute" it. QB64 could only emulate the mouse driver and probably very little else, out of doing such outdated stuff. Sadly, it prevents QB64 from being "100% compatible" while some people insist on throwing it any program that was created with QB or PDS...
There's nothing to do with "QMIDI" except getting DOSBOX or something like that and actually using QB or QBasic to run it.
If this is about reading the mouse, QB64 has its own way of reading the mouse. When in Rome...!
If it's about playing back MIDI, I don't recall where, but I seem to recall folks posting native QB64 code for playing back MIDI. It may have been on the old qb64.org forums.
If there is some other functionality we are trying to accomplish, please describe, and we can find a working QB64 way of accomplishing it...
|