China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 15:31
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » [Original]MIDI Racing Car (Pure DOS C Source Code) View 3,522 Replies 18
Original Poster Posted 2007-02-28 14:40 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Finally added MIDI music to the small racing game I wrote before!
(Need to use HUGE mode, compile with BC)

No MIDI in XP DOS window, only works in pure DOS..
Please try it out... There is source code....
http://zhenlove.com.cn/cndos/fileup/files/midiWavCar5.zip

[ Last edited by GOTOmsdos on 2007-3-6 at 01:11 PM ]
Recent Ratings for This Post ( 3 in total) Click for details
RaterScoreTime
electronixtar +8 2007-02-28 14:51
Kinglion +2 2007-03-01 00:19
henrya2 +4 2007-03-19 07:52
Floor 2 Posted 2007-02-28 14:50 ·  中国 四川 成都 电信
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2007-02-28 14:58 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Thanks a lot..
It would be even better if someone can implement the loop playback...
If implemented, post the code..
Looking forward..

[ Last edited by GOTOmsdos on 2007-2-28 at 02:59 PM ]
Floor 4 Posted 2007-03-01 00:18 ·  中国 辽宁 朝阳 联通
铂金会员
★★★★
痴迷DOS者
Credits 5,798
Posts 1,924
Joined 2003-06-20 00:00
23-year member
UID 5583
Gender Male
From 金獅電腦軟體工作室
Status Offline
Support original posts, learned.
熟能生巧,巧能生精,一艺不精,终生无成,精亦求精,始有所成,臻于完美,永无止境!
金狮電腦軟體工作室愿竭诚为您服务!
QQ群:8393170(定期清理不发言者)
个人网站:http://www.520269.cn
电子邮件:doujiehui@vip.qq.com
微信公众号: doujiehui
Floor 5 Posted 2007-03-01 22:46 ·  中国 北京 昌平区 联通
高级用户
★★
Credits 506
Posts 187
Joined 2005-12-04 22:41
20-year member
UID 46500
Gender Male
Status Offline
Not bad, support original.
Floor 6 Posted 2007-03-01 22:51 ·  中国 北京 昌平区 联通
高级用户
★★
Credits 506
Posts 187
Joined 2005-12-04 22:41
20-year member
UID 46500
Gender Male
Status Offline
I think the loop playback can be considered as follows:
1. First measure the playback time of the music.
2. Use the BIOS clock oscillation to calculate the running time of the program.
3. After the last playback is completed, play the next one.
Floor 7 Posted 2007-03-02 01:17 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
The program originally had a loop playback function, but the loop of that MIDI file was invalid. Later, when the MIDI file was changed, it worked. I don't know the reason.

Just updated the program again, added the function to select and play MIDI files, and both entering XXX and XXX.MID are okay.

But a strange phenomenon occurred:
For example, if the MIDI C file is included but not used in the main C file, an overflow phenomenon will appear during the program operation. If it is used, there is no problem. So, I had to cancel the original function of only playing games without playing MIDI.
Floor 8 Posted 2007-03-03 13:36 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Updated

New features:
1
Realize loop playback
2
When racing, press the 'z' key to stop or play the music...

[ Last edited by GOTOmsdos on 2007-3-3 at 01:52 PM ]
Floor 9 Posted 2007-03-04 15:36 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Update:
1
Option to continue playing at the end can be selected.,
2
The sluggish problem caused by BC compilation is solved. Successfully compiled with TC2, and this problem is resolved...
Floor 10 Posted 2007-03-05 14:42 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Update:
1
New volume adjustment
2
New speed adjustment
3
Multi - color mileage display
4
Screen display operation
5
Improved code efficiency
Floor 11 Posted 2007-03-06 13:14 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Update 1 Synchronize display of adjusted timely status
Floor 12 Posted 2007-03-07 12:08 ·  中国 河南 洛阳 联通
初级用户
★★
Credits 136
Posts 50
Joined 2006-09-08 04:26
19-year member
UID 62117
Status Offline
This needs to be supported...
Floor 13 Posted 2007-03-19 07:52 ·  中国 江西 南昌 电信
中级用户
★★
Credits 486
Posts 171
Joined 2006-02-12 13:53
20-year member
UID 50233
Status Offline
Those who do not study the past are condemned to repeat it
Floor 14 Posted 2007-03-22 10:42 ·  中国 江苏 苏州 电信
中级用户
★★
我是DOS学者
Credits 367
Posts 180
Joined 2006-05-14 10:53
20-year member
UID 55507
Gender Male
From 重庆
Status Offline
There are so many codes, it's really impressive to be able to write such a program.
Floor 15 Posted 2007-03-22 17:33 ·  中国 广东 广州 番禺区 电信
初级用户
★★
Credits 107
Posts 52
Joined 2007-03-10 04:55
19-year member
UID 81272
Gender Male
Status Offline
Bookmarked
Forum Jump: