Some questions

The forum for all of your Freebasic needs!

Moderators: Pete, Mods

User avatar
TmEE
Veteran
Posts: 97
Joined: Mon Mar 17, 2008 11:14 am
Location: Estonia, Rapla
Contact:

Some questions

Postby TmEE » Tue May 06, 2008 2:16 pm

I'm gonna port MD tracker to FreeBASIC (since I've hit some major QB limitation) and I've managed to run into some troubles...

1) How can I get keyboard scan codes ? INP(&H60) doesn't do anymore...

2) There is no ON TIMER anymore... I need something that executes part of code after (insert time here)... in QB45 I just wrote new value to PIT and got ON TIMER(1) to do what required...

3) I can do MIDI anymore by just writing to $330 ($ means HEX here... I'm 68K programmer... Mega Drive / Genesis kicks @$$)...
Mida sa loed ? Nagunii aru ei saa :P

Antoni
Veteran
Posts: 132
Joined: Wed Jun 15, 2005 3:01 pm
Contact:

Postby Antoni » Tue May 06, 2008 3:50 pm

1.- FreeBASIC has a built-in multikey
as those found in QB libraries.

2.-You can emulate ON-TIMER using a background thread. See code .This solution won't compile for DOS...

3.- FB can write to port to $330 if your present compiler can do it. But this is not likely to work in other people's soundcards. For alternative solutions see this thread

User avatar
TmEE
Veteran
Posts: 97
Joined: Mon Mar 17, 2008 11:14 am
Location: Estonia, Rapla
Contact:

Postby TmEE » Tue May 06, 2008 6:40 pm

multikey has no use in my case, I just need keyboard scan codes... hit a key down / release key, the scan code... one key at time.

I'll try to understand the ON TIMER emulation.... I have zero experience with windows programming... and I will not do any pmode DOS stuff...

And for MIDI, writing to $330 won't do in Windows... only in DOS it seems... and I DO NOT want to use any libraries. And I need something very basic.. I don't play MIDI files, I just send in some MIDI commands... stuff like Key On/Off, Program change, Parameter change etc.... I guess Windows API comes here...
Mida sa loed ? Nagunii aru ei saa :P

MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Postby MystikShadows » Tue May 06, 2008 7:33 pm

You're right, Windows API is the better way to go in Windows. I did a series on MIDI Programming in QB Express I have 3 parts so far and working on the 4th part.

Part one .MID File format
http://www.petesqbsite.com/sections/exp ... .html#midi

Part Two - Processing of a midi file with interpreted results.
http://www.petesqbsite.com/sections/exp ... ogramming2

Part tree - Actual formatting and sending of MIDI messages to the MIDI devices.
http://www.petesqbsite.com/sections/exp ... ogramming3

The last one shows how to use the API to open MIDI channels formulate and send MIDI messages of all types (note on/off, and the likes.).

For good timing, the API again in Windows, see the QueryPerformanceTimer function for details.


Hope these help.
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com

User avatar
TmEE
Veteran
Posts: 97
Joined: Mon Mar 17, 2008 11:14 am
Location: Estonia, Rapla
Contact:

Postby TmEE » Tue May 06, 2008 8:11 pm

I've got all answers for my MIDI stuff. Thank you MystikShadows. I might be able to add a MIDI file exporting option too into my tracker.

Scancodes probably come form WinAPI too...

Now I just need to get the playback routine called every 49.4Hz (the closest speed to Mega Drive I got using PCs PIT in QB version).

What a big bite... I need to digest it a little...

EDIT : if anyone's interested in the DOS verison, here's some OLD version : http://www.spritesmind.net/_GenDev//for ... .php?t=220 (latest is 0.4a, but its used for commercial stuff...)
Mida sa loed ? Nagunii aru ei saa :P

MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Postby MystikShadows » Wed May 07, 2008 8:51 am

You're welcome. :-).

Glad it could be of help. I can't wait to see what you'll come with :-).
When God created light, so too was born, the first Shadow!



MystikShadows



Need hosting? http://www.jc-hosting.net



Interested in Text & ASCII development? Look no further!

http://www.ascii-world.com

dymmessgelo
Newbie
Posts: 2
Joined: Tue May 02, 2017 7:20 am
Location: United States of America
Contact:

Some questions

Postby dymmessgelo » Thu May 25, 2017 2:37 pm

So, I bought macromedia flash 2 days ago, and I still dont understand how to use it. Really, its completely new for me. I have read some stuff about it on the internet but its not helpful enough. Anyone here could explain how to use this for me?

Anyways, you can go to www.epicvin.com and enter the VIN# to find out whether it was really glitched or not and if it has stripped damage or glass rear stained or soiled. Costs cheaper than carfax though and it also has pictures of all vehicles.


Return to “Freebasic Questions & Answers”

Who is online

Users browsing this forum: No registered users and 2 guests

cron