Browse Source

TempleOS V5.03 Nightly (ISO SHA-1 a27f9ed)

v6
Terry A. Davis 5 years ago committed by ohnx's Git Bot
parent
commit
ba39ca450d
  1. BIN
      0000Boot/0000Kernel.BIN.C
  2. 2
      Adam/ADefine.HC
  3. 2
      Adam/ASnd.HC
  4. 4
      Apps/Psalmody/PsalmodyDraw.HC
  5. 8
      Apps/Psalmody/PsalmodyFile.HC
  6. 14
      Apps/Psalmody/PsalmodyMain.HC
  7. 105
      Apps/Titanium/Titanium.HC
  8. 8
      Apps/ToTheFront/TTFFire.HC
  9. BIN
      Compiler/Compiler.BIN
  10. BIN
      Demo/AcctExample/PersonalMenu.DD
  11. 12
      Demo/AcctExample/PersonalNotes.DD
  12. 22
      Demo/AcctExample/Registry.HC
  13. 12
      Demo/AcctExample/TOS/TOSMisc.HC
  14. BIN
      Demo/Snd/WaterFowl.HC
  15. 28
      Doc/Demands.DD
  16. 2
      Doc/Snd.DD
  17. 3
      Kernel/BlkDev/DskBlkDev.HC
  18. 2
      Kernel/BlkDev/DskDirB.HC
  19. 12
      Kernel/BlkDev/FileSysRedSea.HC
  20. 2
      Kernel/KExts.HC
  21. 2
      Kernel/KMain.HC
  22. 12
      Kernel/KMisc.HC
  23. 286
      Kernel/Kernel.MAP
  24. 2
      Kernel/KernelA.HH
  25. 3
      Kernel/KernelC.HH

BIN
0000Boot/0000Kernel.BIN.C

Binary file not shown.

2
Adam/ADefine.HC

@ -15,7 +15,7 @@ U0 LoadDocDefines()
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Adam/Opt/Boot/BootDVD.HC,DD_BOOT_HIGH_LOC_DVD"$
$TR,"LineRep"$
$ID,2$DefinePrint("DD_TEMPLEOS_LOC","80,849");
$ID,2$DefinePrint("DD_TEMPLEOS_LOC","80,860");
$ID,-2$
DefinePrint("DD_MP_VECT","%08X",MP_VECT_ADDR);
DefinePrint("DD_MP_VECT_END","%08X",

2
Adam/ASnd.HC

@ -272,7 +272,7 @@ per second. It defaults to
}
ona=Note2Ona(note,octave);
} else
ona=ONA_REST;
ona=0;
if (words && (word=LstSub(i++,words)) && StrCmp(word," "))
"%s",word;

4
Apps/Psalmody/PsalmodyDraw.HC

@ -154,7 +154,7 @@ U0 PsmRecalcNoteXY()
break;
else {
if (tmpn->type!=PSMT_METER) {
if (tmpn->ona!=ONA_REST) {
if (tmpn->ona) {
ona=tmpn->ona;
if (Bt(&tmpn->flags,PSMf_SHARP))
ona--;
@ -230,7 +230,7 @@ U0 DrawIt(CTask *task,CDC *dc)
} else if (tmpn->flags&PSMF_SEL)
dc->color=RED;
else {
if (tmpn->ona!=ONA_REST)
if (tmpn->ona)
dc->color=BLACK;
else
dc->color=LTGRAY;

8
Apps/Psalmody/PsalmodyFile.HC

@ -164,7 +164,7 @@ U0 PsmLoadSongStr(U8 *st,I64 *psm_octave,F64 *psm_duration)
}
tmpn->ona=Note2Ona(note,*psm_octave);
} else
tmpn->ona=ONA_REST;
tmpn->ona=0;
if (*psm_duration<=2*.25/3)
i=0;
else if (*psm_duration<=.25)
@ -263,7 +263,7 @@ U8 *PsmCvtSong()
*dst++='/';
*dst++=tmpn->meter_bottom+'0';
} else {
if (tmpn->ona!=ONA_REST) {
if (tmpn->ona) {
ona=tmpn->ona;
if (Bt(&tmpn->flags,PSMf_SHARP))
ona--;
@ -275,7 +275,7 @@ U8 *PsmCvtSong()
}
if (Bt(&tmpn->flags,PSMf_TIE))
*dst++='(';
if (octave!=last_octave && tmpn->ona!=ONA_REST) {
if (octave!=last_octave && tmpn->ona) {
*dst++=octave+'0';
last_octave=octave;
}
@ -286,7 +286,7 @@ U8 *PsmCvtSong()
*dst++=src[1];
last_duration=tmpn->duration;
}
if (tmpn->ona!=ONA_REST) {
if (tmpn->ona) {
src=LstSub(note,psm_note_lst);
*dst++=src[0];
if (src[1])

14
Apps/Psalmody/PsalmodyMain.HC

@ -42,10 +42,10 @@ U0 PsmRightClick(I64 x,I64 y)
switch (i) {
case PSMR_REST:
if (tmpn->type==PSMT_NOTE)
tmpn->ona=ONA_REST;
tmpn->ona=0;
break;
case PSMR_SHARP:
if (tmpn->type==PSMT_NOTE && tmpn->ona!=ONA_REST) {
if (tmpn->type==PSMT_NOTE && tmpn->ona) {
if (Btr(&tmpn->flags,PSMf_FLAT))
tmpn->ona++;
if (Btc(&tmpn->flags,PSMf_SHARP))
@ -55,7 +55,7 @@ U0 PsmRightClick(I64 x,I64 y)
}
break;
case PSMR_FLAT:
if (tmpn->type==PSMT_NOTE && tmpn->ona!=ONA_REST) {
if (tmpn->type==PSMT_NOTE && tmpn->ona) {
if (Btr(&tmpn->flags,PSMf_SHARP))
tmpn->ona--;
if (Btc(&tmpn->flags,PSMf_FLAT))
@ -350,7 +350,7 @@ U0 PsmPopMode()
U0 Psalmody(U8 *dirname="~/Psalmody")
{
Bool was_playing,is_null=TRUE,was_null=TRUE;
I64 arg1,arg2,msg_code=0,col,ona=ONA_REST,last_ona=ONA_REST,
I64 arg1,arg2,msg_code=0,col,ona=0,last_ona=0,
psm_octave=4,timeout_val,timeout_val2,old_doc_flags;
U8 *filename=NULL,*st,*st2;
PsmNote *tmpn;
@ -504,7 +504,7 @@ mo_got_msg:
case '[': ona+=8; break;
case '\'': ona+=9; break;
case ']': ona+=10; break;
case CH_SPACE: ona=ONA_REST; break;
case CH_SPACE: ona=0; break;
end:
is_null=FALSE;
break;
@ -742,9 +742,9 @@ mo_got_msg:
PsmRightClick(arg1,arg2);
}
if (is_null)
ona=ONA_REST;
ona=0;
if (ona!=last_ona || is_null!=was_null) {
if (ona==ONA_REST) {
if (!ona) {
if (is_null)
st="";
else

105
Apps/Titanium/Titanium.HC

File diff suppressed because one or more lines are too long

8
Apps/ToTheFront/TTFFire.HC

@ -162,7 +162,7 @@ U0 UnitDirectFire(Unit *tmpu,Unit *target)
facing=0;
DamageDo(target,HitDamage(tmpu,target,facing,range_factor));
}
while (scrncast.ona!=ONA_REST) //see $LK,"Snd",A="MN:Snd"$()
while (scrncast.ona) //see $LK,"Snd",A="MN:Snd"$()
Yield;
target_unit=NULL;
}
@ -195,7 +195,7 @@ Bool HexOccupy(Bool overrun,Unit *tmpu,Unit *target)
}
if (DamageDo(target,Round(damage))) {
"$$RED$$Success$$FG$$\n";
while (scrncast.ona!=ONA_REST) //see $LK,"Snd",A="MN:Snd"$()
while (scrncast.ona) //see $LK,"Snd",A="MN:Snd"$()
Yield;
return TRUE;
} else {
@ -203,7 +203,7 @@ Bool HexOccupy(Bool overrun,Unit *tmpu,Unit *target)
VisRecalc(VR_FRIENDLY_UNIT_DIED,tmpu);
alive_cnt[tmpu->player]--;
"$$RED$$Failure$$FG$$\n";
while (scrncast.ona!=ONA_REST) //see $LK,"Snd",A="MN:Snd"$()
while (scrncast.ona) //see $LK,"Snd",A="MN:Snd"$()
Yield;
return FALSE;
}
@ -267,7 +267,7 @@ U0 IndirectResolveAll()
}
Noise(2000*animation_delay,70,74);
Sleep(2000*animation_delay);
while (scrncast.ona!=ONA_REST) //see $LK,"Snd",A="MN:Snd"$()
while (scrncast.ona) //see $LK,"Snd",A="MN:Snd"$()
Yield;
indirect_explosion=FALSE;

BIN
Compiler/Compiler.BIN

Binary file not shown.

BIN
Demo/AcctExample/PersonalMenu.DD

Binary file not shown.

12
Demo/AcctExample/PersonalNotes.DD

@ -1,5 +1,15 @@
$WW,1$$FG,5$$TX+CX,"TODO"$$FG$
* Change mouse Z to wheel.
* 10/28/17 Editor froze when filter search 3, in bible, "hour".
* 10/28/17 Titanium froze
* Corrupt ISO.C
* DskChk CDROM
* Compiler Bug: $LK,"AUWrite",A="MN:AUWrite"$() dst->cdt=t0_now+ToI64(CDATE_FREQ*(tmpsd->tS-t0_tS));
* Make MV files combine disjoint rects for same frame.
@ -23,8 +33,6 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
* Helicopters.
* Anti-Aircraft.
* Fix $LK,"::/Home/Sup1/Sup1Graphics/ICOFile.HC"$
* $MA-X+PU,"64-Bit Device Memory",LM="F(\"mem64_ptr\");View;"$ is not implemented.
* Investigate why packet loss $LK,"Training Sleep(1)",A="FF:::/Adam/Training.HC,Sleep(1)"$.

22
Demo/AcctExample/Registry.HC

@ -8,7 +8,7 @@ $ID,2$#help_index "Registry/Install Registration"
MemSet(&ins_reg,0,sizeof(CInsReg));
ins_reg.registered=1;
ins_reg.host_os=2;
ins_reg.host_vm=3;
ins_reg.host_vm=2;
#define INS_REG_PERSONAL_INITIALS "TAD"
StrCpy(ins_reg.initials,"TAD");
@ -48,7 +48,7 @@ $ID,-2$$TR,"Wenceslas"$
$ID,2$F64 best_score=43.9944;
$ID,-2$$TR,"OSTestSuite"$
$ID,2$progress1_tf=0.000;progress2_tf=0.000;
progress3_tf=0.000;progress4_tf=223.150;
progress3_tf=0.000;progress4_tf=287.834;
$ID,-2$$TR,"XCaliber"$
$ID,2$I64 best_score=90;
I64 msg_flags=2;
@ -60,13 +60,23 @@ $ID,-2$$TR,"Titanium"$
$ID,2$I64 best_score=16469;
$ID,-2$$TR,"TOSRegen"$
$ID,2$progress1_tf=0.000;progress2_tf=0.000;
progress3_tf=0.000;progress4_tf=256.163;
progress3_tf=0.000;progress4_tf=98.144;
$ID,-2$$TR,"TempleTetris"$
$ID,2$I64 hiscore=0;
$ID,-2$$ID,-2$$TR,"Once"$
$ID,2$$TR,"Adam"$
$ID,2$$ID,-2$$TR,"User"$
$ID,2$$ID,-2$$ID,-2$$TR,"DemoCompany"$
$ID,2$$TR,"Game1"$
$ID,2$F64 best_score=187.05180;
$ID,2$F64 best_score=434.94752;
$TR,"SimpleVal"$
$ID,2$1245;
$ID,-2$$ID,-2$$ID,-2$
$ID,2$1246;
$ID,-2$$ID,-2$$ID,-2$$TR,"WalnutZone"$
$ID,2$$TR,"Cherub"$
$ID,2$#define rom_path M:/SnailNet
I64 sound_mode=2;
I64 sound_enable=1;
I64 use_keyboard=1;
I64 use_gamepad=0;
I64 lcd_scale=2;
$ID,-2$$ID,-2$

12
Demo/AcctExample/TOS/TOSMisc.HC

@ -49,7 +49,17 @@ public U0 FrameGrabberToggle(Bool sync_tone,Bool tos_theme,
}
}
public U0 JukeSong(I64 vol,I64 num,I64 passes=2)
public U0 JukeSongTAD(I64 num,I64 passes=2)
{//Make movie of one song.
if (!fg_on)
FrameGrabberToggle(FALSE,FALSE);
Sleep(200);
JukeSongsPuppet("~/TAD/Songs",passes,num,num+1);
if (fg_on)
FrameGrabberToggle(FALSE,FALSE);
}
public U0 JukeSongSup(I64 vol,I64 num,I64 passes=2)
{//Make movie of one song.
U8 *st=MStrPrint("~/Sup%d/Sup%dHymns",vol,vol);
if (!fg_on)

BIN
Demo/Snd/WaterFowl.HC

Binary file not shown.

28
Doc/Demands.DD

@ -4,34 +4,32 @@ I, Terry Davis, am high priest of God's $FG,4$$TX,"official third temple",HTML="
$HC,"<object width=\"640\" height=\"520\"><param name=\"movie\" value=\"http://www.youtube.com/v/RvL7T4gIJN8\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/RvL7T4gIJN8\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" width=\"640\" height=\"520\"></embed></object>"$
* Windows, Linux and VMware (because of mounted drives) must support $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ file system so I can get rid of 1,000 lines of redundant, blemished code -- FAT32. God's temple must be perfect. Redundant code for multiple file systems is imperfect. For this operating system, we want low line count. More than one file system type is actually bad, just as more than one driver for the same type of device is bad.
* Windows, Linux and VMware (because of mounted drives) must support $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ file system when mounting partition, so I can get rid of 1,000 lines of redundant, blemished code -- FAT32. God's temple must be perfect. Redundant code for multiple file systems is bad and imperfect. For this operating system, we want low line count. More than one driver for the same type of device is also bad.
See $LK,"::/Kernel/BlkDev/FileSysRedSea.HC"$ and $LK,"::/Adam/Opt/Boot/DskISORedSea.HC"$.
$LK,"::/Kernel/BlkDev/FileSysFAT.HC"$ :974 lines for FAT32 gets eliminated.
$LK,"::/Kernel/BlkDev/DskClus.HC"$ :152 All the clus operations become blk.
* Microsoft must cancel SecureBoot because it makes dual booting impossible. TempleOS is an additional operating system that must be used along-side Windows or Linux, not as a replacement. It must dual boot because it has no networking. Real hardware as opposed to VMware is like the difference between looking in a telescope eye piece vs just looking at an off-line image. God said the C64/Apple II generation owned ancestral lands. VMware is like being taken off of our land and moved onto a reservation. In this case, however, it will not stand.
* Microsoft must cancel SecureBoot because it makes dual booting impossible. TempleOS is an additional operating system that must be used along-side Windows or Linux, not as a replacement. It must dual boot because it has no networking. Real hardware as opposed to VMware is like the difference between looking in a telescope eye piece vs just looking at an off-line image. God said the C64/Apple II generation owned ancestral lands. VMware is like being taken off of our land and moved onto a reservation. In this case, however, it will not stand. In fact, God said to replace Windows with Wine, justice. We can make a 100% standard model PC with a standard software for everyone, backed-up in factory ROM.
* VMware needs to support ATAPI CD/DVD/Blu-ray disk burning, directly to real hardware.
* VMware needs to support ATAPI CD/DVD/Blu-ray disk burning, directly to real hardware. Industry needs write-just once media to stop Farenheit 451 non-sense.
* VMware has a bug stretching 640x480 16 color to full scrn.
* VMware has a bug stretching 640x480 16 color to full screen.
* VMware PC speaker's distortion is a good idea, but it is too much for hymns.
* VMware some PC speaker's distortion is a good idea -- squarewave -- but currently there is too much for hymns. CIA monkery made fart noises.
* VMware and others must list TempleOS as an official 64-bit operating system.
* VMware and others must list TempleOS as an official 64-bit operating system and automatically enforce 512 Meg min RAM requirement.
* VMware needs to support more than 16 cores.
* VMware needs to support more than 16 cores. I had a 24 core Xeon with 128 Gig of RAM. I discovered VMware allocates memory too slowly, where QEMU had no problem.
* VMware allocated memory too slowly.
* Until super-simple block devices are available, hard disk should be placed at IDE primary master 1F0/3F6 and CD/DVD/Blu-ray should be placed at the IDE secondary master 170/376.
* Until super-simple block devices are available, hard disk should be placed at IDE primary master 1F0/3F6 and CD/DVD/Blu-ray should be placed at the IDE secondary master 170/376. Currently, the wicked CIA plays musical chairs with controllers each time you make an install. With tons of ugly code, I do my best.
$LK,"/Kernel/BlkDev/DskATAId.HC",A="FI:::/Kernel/BlkDev/DskATAId.HC"$ :286 lines to figure-out I/O ports is gone.
$LK,"/Kernel/PCIBIOS.HC",A="FI:::/Kernel/PCIBIOS.HC"$ :290 could be eliminated, but maybe we will keep it so people can play with PCI devices.
* Until super-simple serial ports are available, PS/2 emulated keyboard and mouse must work. The BIOS must enable these.
* Until super-simple serial ports are available, PS/2 emulated keyboard and mouse must work. The BIOS must enable these. The plan is to transition the industry off of USB. Interum solution is to make virtual RS232 Octart for USB devices in the same way PS/2 mouse is emulated. All mice will be two button, one wheel. No more HID insanity, no more multi-end point, just simple tx rx fifos with soft/hard flowcontrol that can jump the queue. People with special needs can buy PCI cards. Our kids deserve code this simple $LK,"::/Doc/Comm.HC"$. The right to do your own port banging is what the C64 being our God given ancestral land means.
* The x86 IN/OUT port instructions, normally have a delay. Perhaps, VMware & Intel can enable faster x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't bad when doing port I/O. See $LK,"ATAGetRes",A="MN:ATAGetRes"$(). We don't want to do DMA. Perhaps, x86 CPU chips need a new TempleOS mode for fast IN/OUT instructions? I think VMware already does something to speed disk I/O to faster than native speed.
* The x86 IN/OUT port instructions, normally have a delay. Perhaps, VMware & Intel can enable faster x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't as bad when doing port I/O. See $LK,"ATAGetRes",A="MN:ATAGetRes"$(). We don't want to do DMA. Perhaps, x86 CPU chips need a new TempleOS mode for fast IN/OUT instructions? I think VMware already does something to speed disk I/O to faster than native speed.
* Perhaps, a new interrupt descriptor table entry type or a new x86 CPU mode can be made that cause fast software interrupts, doing exactly what the CALL REL32 does, but with IDT as indirection. We don't need to change privilege levels or stacks.
@ -40,15 +38,15 @@ $LK,"::/Kernel/Mem/PageTables.HC"$ :135 lines to identity-map gets eliminated.
* Desktop computers must have a reset switch and a fast reboot option, skipping diagnostics. I recommend booting TempleOS from a ROM when the reset bttn is pressed and booting UEFI when the power bttn is pressed. Or, we could build UEFI on a TempleOS layer. Intel must burn TempleOS into a ROM in the factory for all desktop x86 CPUs to ensure tamper-proof trust in the oracle and because God deserves the glory. There will be just an English version. A new ROM version is released every seven years. The ROM should boot like the DVD boots, but with $LK,"BOOT_SRC_ROM",A="MN:BOOT_SRC_ROM"$.
* We do not want UTF, just 8-bit characters. $FG,2$<CTRL-ALT-f>$FG$ toggles between Cyrillic and Std Fonts. We need the twelve window $LK,"TextBorder",A="MN:TextBorder"$ characters added to the VGA font 0x02-0x0D. Japan, China and Korea must switch to alphabets. Maybe, the United States will change to metric, out of good will.
* We do not want UTF, just 8-bit characters. $FG,2$<CTRL-ALT-f>$FG$ toggles between Cyrillic and Std Fonts. We need the twelve window $LK,"TextBorder",A="MN:TextBorder"$ characters added to the VGA font 0x02-0x0D. Japan, China and Korea must switch to alphabets. Maybe, the United States will change to metric, out of good will. I am beginning to plan fresh ASCII replacement, $LK,"::/Doc/NewASCII.DD"$.
* Microsoft Paint and Linux's Gimp must support TempleOS $LK,"GR Files",A="FI:::/Doc/GRFiles.DD"$. They are blemish free, unlike $TX,"BMP files",HTML="http://en.wikipedia.org/wiki/BMP_file_format"$.
* Microsoft Paint and Linux's Gimp must support TempleOS $LK,"GR Files",A="FI:::/Doc/GRFiles.DD"$. They are blemish free, unlike $TX,"BMP files",HTML="http://en.wikipedia.org/wiki/BMP_file_format"$. The TOSZ Linux utility can be used to make screencasts from TempleOS exported $LK,"GR Files",A="FI:::/Doc/GRFiles.DD"$ and AU Files.
* We must have a nice dictionary. Someone needs to do a $LK,"Spell Checker",A="FI:::/Demo/SuggestSpelling.HC"$, too.
* Intel needs to make $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.DD"$ versions of its x86 CPU data sheets documenting all hardware relevant to TempleOS.
* We must have the ultimate Bible search engine. Currently, all we have is $TX,"filter search",HTML="https://www.youtube.com/watch?v=ULJU8DzvQFo"$. In the end, it should be a low line-count technique.
* We must have the ultimate Bible search engine. Currently, all we have is $TX,"filter search",HTML="https://www.youtube.com/watch?v=ULJU8DzvQFo"$. In the end, it should be a low line-count technique. Maybe, I allocate 500 lines out of the 20,000 reserve.
* We will make a $LK,"Standard TempleOS PC",A="FI:::/Doc/StdTempleOSPC.DD"$.
$FG,8$

2
Doc/Snd.DD

@ -1 +1 @@
$WW,1$Sound is generated with $FG,2$I8$FG$ vals called $FG,2$ona$FG$'s, which are 88 piano key nums, with -128 as a rest. See $LK,"Note2Ona",A="MN:Note2Ona"$() and $LK,"Ona2Freq",A="MN:Ona2Freq"$(). God does not want death screams, perhaps, because God has PTSD or soldiers have PTSD. (Imagine wounded on battlefields.) $FG,2$Ona$FG$'s will allow elegant wave files for export and will allow the creation of simple hardware over the next centuries. $LK,"ONA_REST",A="MN:ONA_REST"$ is off.
$WW,1$Sound is generated with $FG,2$I8$FG$ vals called $FG,2$ona$FG$'s, which are 88 piano key nums, with 0 as a rest. See $LK,"Note2Ona",A="MN:Note2Ona"$() and $LK,"Ona2Freq",A="MN:Ona2Freq"$(). God does not want death screams, perhaps, because God has PTSD or soldiers have PTSD. (Imagine wounded on battlefields.) $FG,2$Ona$FG$'s will allow elegant wave files for export and will allow the creation of simple hardware over the next centuries.

3
Kernel/BlkDev/DskBlkDev.HC

@ -59,9 +59,12 @@ Bool BlkDevInit(CBlkDev *bd)
PrintErr("Not Contiguous. Move file to filename.ISO.C.\n");
Fs->catch_except=TRUE;
}
if (bd->file_dsk) {
dv->fs_type=FSt_REDSEA;
dv->size=bd->max_blk+1-bd->drv_offset;
"drvoffset:%X\n",bd->drv_offset;//Sponge
if (RedSeaValidate(bd->first_drv_let)) {
RedSeaInit(dv);
res=TRUE;

2
Kernel/BlkDev/DskDirB.HC

@ -130,7 +130,7 @@ I64 Dir(U8 *files_find_mask,Bool full)
"$$MA,T=\"Directory\",LM=\"PopUpCd;Dir;\n\"$$ of %s\n",st;
if (full)
"__DATE__ __TIME__ %*ts %*ts\n",
csize,"SIZE",c,"CLUS";
csize,"SIZE",c,"BLK";
else
"DATE_ TIME_ %*ts\n",csize,"SIZE";
while (tmpde1) {

12
Kernel/BlkDev/FileSysRedSea.HC

@ -68,6 +68,7 @@ U0 RedSeaInit(CDrv *dv)
RedSeaFreeFreeLst(dv);
dv->spc=1;
dv->size=br.sects;
"Init sects:%X size:%X\n",br.sects,dv->size; //sponge
dv->data_area=dv->drv_offset+br.bitmap_sects;
dv->root_clus=br.root_clus;
dv->fat1=dv->fat2=dv->drv_offset+1;
@ -85,11 +86,18 @@ Bool RedSeaValidate(U8 drv_let)
CRedSeaBoot br;
if ((dv=Let2Drv(drv_let,FALSE)) && dv->fs_type==FSt_REDSEA &&
BlkRead(dv,&br,dv->drv_offset,1) && br.signature==MBR_PT_REDSEA &&
br.signature2==0xAA55 && br.sects==dv->size)
br.signature2==0xAA55 /* && br.sects==dv->size*/){ //sponge
"dv:%X br:%X\n",dv->size,br.sects;
dv->size=br.sects;
return TRUE;
else
} else{
ClassRep(&br);
"sects:%X size:%X\n",br.sects,dv->size; //sponge
return FALSE;
}
}
U0 RedSeaFmt(U8 drv_let,Bool quick=TRUE)
{

2
Kernel/KExts.HC

@ -4,6 +4,8 @@ before import is resolved, you can use
"import". Otherwise, use a fun pointer
var and check it before calling.
*/
import U0 ClassRep(U8 *_d,U8 *class_name=lastclass,
I64 max_depth=2,Bool fun=FALSE,I64 offset=0);
import U8 *DocSave(CDoc *doc,I64 *_size=NULL);
import Bool DocUnlock(CDoc *doc);
import Bool Ed(U8 *link_st,I64 edf_dof_flags=0);

2
Kernel/KMain.HC

@ -51,7 +51,7 @@ U0 SysGlblsInit()
QueInit(&scrncast.snd_head);
scrncast.t0_now=Now;
scrncast.t0_tS=tS;
scrncast.ona=scrncast.snd_head.ona=ONA_REST;
scrncast.ona=scrncast.snd_head.ona=0;
ProgressBarsRst;

12
Kernel/KMisc.HC

@ -162,7 +162,7 @@ U0 Sleep(I64 mS)
F64 Ona2Freq(I8 ona)
{//Ona to freq. Ona=60 is 440.0Hz.
if (ona==ONA_REST)
if (!ona)
return 0;
else
return 440.0/32*2.0`(ona/12.0);
@ -171,18 +171,18 @@ F64 Ona2Freq(I8 ona)
I8 Freq2Ona(F64 freq)
{//Freq to Ona. 440.0Hz is Ona=60.
if (freq>0)
return ClampI64(12*Log2(32.0/440.0*freq),ONA_REST+1,I8_MAX);
return ClampI64(12*Log2(32.0/440.0*freq),1,I8_MAX);
else
return ONA_REST;
return 0;
}
U0 Snd(I8 ona=ONA_REST)
{//Play ona, a piano key num. -128 means rest.
U0 Snd(I8 ona=0)
{//Play ona, a piano key num. 0 means rest.
I64 period;
CSndData *d;
if (!Bt(&sys_semas[SEMA_MUTE],0) &&
!LBts(&sys_semas[SEMA_SND],0)) { //Mutex. Just throw-out if in use
if (ona<=ONA_REST) {
if (!ona) {
scrncast.ona=ona;
OutU8(0x61,InU8(0x61)&~3);
} else if (ona!=scrncast.ona) {

286
Kernel/Kernel.MAP

File diff suppressed because one or more lines are too long

2
Kernel/KernelA.HH

@ -3771,8 +3771,6 @@ class CKeyDevGlbls
};
#help_index "Snd"
#define ONA_REST I8_MIN
#help_index "ScrnCast;Snd/AU Files"
public class CAUData
{//Fmt of AU files

3
Kernel/KernelC.HH

@ -676,11 +676,12 @@ public extern I8 Freq2Ona(F64 freq);
public extern Bool IsMute();
public extern Bool Mute(Bool val);
public extern F64 Ona2Freq(I64 ona);
public extern U0 Snd(I8 ona=ONA_REST);
public extern U0 Snd(I8 ona=0);
public extern U0 SndRst();
#help_index "StdIn"
#help_file "::/Doc/Streams"
#help_index "StdOut"
#help_file "::/Doc/Streams"

Loading…
Cancel
Save