source: trunk/BOOTCODE/SPECIAL/SOUND.ASM@ 54

Last change on this file since 54 was 51, checked in by Ben Rietbroek, 12 years ago

AiR-BOOT v1.0.8-rc3 build-20120909 [2012-09-10]

With Git one can easily hop-skip-and-jump between branches.
So I use Git for my local repos and make use of this easy branching.
Because SVN can only handle lineair history, these branches had to be
rebased before committing them to Netlabs. So, this commit contains a
multitude of changes which makes it a bit hairy.

New

o Display LVM drive-letters in the main menu

A populair request was to show drive-letter information in the menu.
Drive-letters however, are OS specific and AiR-BOOT cannot
accurately predict what drive-letter other operating systems would
assign to what partition. eCS LVM drive-letters however are stored
in the LVM-record and can thus be displayed.

o Added 'Show LVM Drive Letters' option in SETUP/BASIC

This will toggle the display of LVM drive-letters in the main menu.
By default this option is enabled.

o Show popup message when BIOS INT13X extensions are not available

The system is halted.

o Show 'DEL to Power Off' in the bottom left corner

This tries to power-off the system, but it may not work for you.

o Simple interactive debugger

Outputs to the serial port with a few one-letter commands to dump
internal tables and state. (Only available in debug builds)

o Enhanced drive-letter feature

Enable multiple eCS installations using the same drive-letter.
This makes it possible to clone a system with the command
'XCOPY /h /o /t /s /e /r /v /e' to another drive and have that boot
from the same drive-letter.
(Or installing to the same drive by hiding the other system)

Changes

o Reduced MBR protection-image from 1024 to 768 bytes

Luckily the MBR Protection Image code does not exceed 768 bytes,
so that gives us another 256 bytes of precious code-space.
Now the non-EN versions are happy again.
Note that the alignment for the image changed from 512 to 256 bytes.
MBR-PROT.ASM, FIXCODE.C, PARTMAIN.ASM and AIR-BOOT.ASM have been
adjusted for this change.
The fight for code-space continues...

o Updating from v1.06 now also copies over drive-letters

When the user has forced drive-letters in v1.06 these will be copied
over to the v1.0.8 configuration when upgrading.
Because the drive-letter feature is broken in v1.07,
the drive-letter table does not get copied over when upgrading
from v1.07.

o Made FX-code optional to compile in

The FX-code supplies the shifting screen-effects when 'Cooper Bars'
is enabled in the setup. With the current enhancements made however,
there is a continuous lack of code-space, especially when debug-code
is included during development. The FX-code occupies some
1200 bytes, a space that can be put to better use. Therefore the
inclusion of the FX-code has been made conditional to make room for
either debugging or future new features.

o Also rewrite PBR on HPFS

Earlier, a fix was made to write a modified PBR back in case JFS was
used. This was done to enable the drive-letter feature on JFS, since
the PBR JFS-bootcode does not use the supplied PBR in memory.
With the enhancements in the drive-letter feature, the HPFS PBR
needs to be updated on disk also, to cope with zero drive-letters in
the HPFS PBR. This potentially fixes a missing drive-letter in the
PBR when the system is restored from an archive. You might need the
drive-letter feature to force the correct drive-letter on the first
boot, after which the feature can be disabled.

o Added extra MBR protection

When AiR-BOOT is active, it is only AiR-BOOT that writes to the MBR.
To protect the MBR from programming errors, like the one below,
any write to the MBR is now checked for validity.
In essence this is protecting your MBR from bad programming done
by me...

Fixes

o Fixed a minor bug with displaying LVM drive-letters

When more partitions that can be displayed were present, scrolling
the menu would not scroll the drive-letter. Fixed.

o Fixed a bug with regard to the drive-letter feature

When partitions were deleted, and some partitions above the deleted
partition(s) had a drive-letter forced, these partitions would lose
this assignment. This bug is also present in v1.06.

Note

The AIRBOOT.HIS file mentions a DOCU directory with the AiR-BOOT
documentation etc. However, this is not present in this commit and
will be provided at a later time.

File size: 3.5 KB
Line 
1; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
2;
3; This file is part of AiR-BOOT
4;
5; AiR-BOOT is free software: you can redistribute it and/or modify it under
6; the terms of the GNU General Public License as published by the Free
7; Software Foundation, either version 3 of the License, or (at your option)
8; any later version.
9;
10; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
11; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
12; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13; details.
14;
15; You should have received a copy of the GNU General Public License along with
16; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
17;
18;---------------------------------------------------------------------------
19; AiR-BOOT / SOUND SUPPORT
20;---------------------------------------------------------------------------
21
22IFDEF MODULE_NAMES
23DB 'SOUND',0
24ENDIF
25
26; Here is some sound code. Requested by Hex1753.
27
28SOUND_PreBootMenu Proc Near Uses ax
29 test byte ptr [CFG_MakeSound], 1
30 jz SOUND_PreBootMenu_SkipSound
31 test byte ptr [StartSoundPlayed], 1
32 jnz SOUND_PreBootMenu_SkipSound
33 mov ax, 1500
34 call SOUND_MakeSound
35 mov ax, 100
36 call SOUND_WaitToSilence
37 mov ax, 2000
38 call SOUND_MakeSound
39 mov ax, 200
40 call SOUND_WaitToSilence
41 mov byte ptr [StartSoundPlayed], 1
42 SOUND_PreBootMenu_SkipSound:
43 ret
44SOUND_PreBootMenu EndP
45
46SOUND_ExecuteBoot Proc Near Uses ax
47 test byte ptr [CFG_MakeSound], 1
48 jz SOUND_ExecuteBoot_SkipSound
49 mov ax, 2000
50 call SOUND_MakeSound
51 mov ax, 10
52 call SOUND_WaitToSilence
53 mov ax, 1000
54 call SOUND_MakeSound
55 mov ax, 20
56 call SOUND_WaitToSilence
57 mov ax, 1500
58 call SOUND_MakeSound
59 mov ax, 10
60 call SOUND_WaitToSilence
61 mov ax, 1900
62 call SOUND_MakeSound
63 mov ax, 20
64 call SOUND_WaitToSilence
65 mov ax, 1000
66 call SOUND_MakeSound
67 mov ax, 10
68 call SOUND_WaitToSilence
69 mov ax, 1500
70 call SOUND_MakeSound
71 mov ax, 30
72 call SOUND_WaitToSilence
73 SOUND_ExecuteBoot_SkipSound:
74 ret
75SOUND_ExecuteBoot EndP
76
77SOUND_MakeSound Proc Near Uses bx dx
78 mov bx, ax
79 mov ax, 34DDh
80 mov dx, 0012h
81 cmp dx, bx ; Too small frequency
82 jnb SOUND_MakeSound_J1
83 div bx
84 mov bx, ax
85 in al, 61h
86 test al, 03h ; Already playing (?)
87 jnz SOUND_MakeSound_J2
88 or al, 03h
89 out 61h, al
90 mov al, -4Ah
91 out 43h, al
92 SOUND_MakeSound_J2:
93 mov al, bl
94 out 42h, al
95 mov al, bh
96 out 42h, al
97 SOUND_MakeSound_J1:
98 ret
99SOUND_MakeSound EndP
100
101SOUND_WaitToSilence Proc Near Uses bx cx dx
102 ; AX = MilliSeconds
103 mov bx, 03E8h
104 mul bx
105 mov cx, dx
106 mov dx, ax
107 mov ax, 8600h
108 int 15h
109 in al, 61h
110 and al, 0FCh
111 out 61h, al
112 ret
113SOUND_WaitToSilence EndP
114
115
116
117; Rousseau: added
118SOUND_Beep PROC Near
119 pushf
120 pusha
121
122 mov al, 7
123 mov bh, 0
124 mov bl, 7
125 mov ah, 0eh
126 int 10h
127
128 popa
129 popf
130 ret
131SOUND_Beep ENDP
Note: See TracBrowser for help on using the repository browser.