Changeset 48


Ignore:
Timestamp:
Apr 12, 2014, 11:49:26 AM (12 years ago)
Author:
Ben Rietbroek
Message:

AiR-BOOT v1.0.8-rc2 build-20120423 [2012-04-29]

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can DESTROY THE MBR on ALL ATTACHED DISKS!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE THESE COMMITS!!

Fixes

o Fixed some minor bugs with SPT < 63

Some extra var StatusCode was used instead of Status_Code.
This caused too few tracks not to be reported.
No installation was done however.
This bug is also present in the v1.06 code.

o There is still a very strange bug in the DOS version

When /cid is given, Track0write has a different and incorrect
address to the Track0 buffer.
This causes garbage to be written to track0 !!
Without /cid it works fine.
For now, /cid will be disabled except for OS/2, where it works
correctly.

Location:
trunk
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/AIR-BOOT.HIS

    r47 r48  
    2020
    2121
     22
    2223; ---------------------------------
    2324; Rousseau: Fixes and Enhancements
    2425; ---------------------------------
    2526;
    26 ; v1.0.8-rc2-bld2012042?
     27; v1.0.8-rc2-bld20120423
    2728; ----------------------
     29; # Fixed some minor Installer bugs with SPT < 63 #
     30;   Some extra var StatusCode was used instead of Status_Code.
     31;   This caused too few tracks not to be reported.
     32;   No installation was done however.
     33;   This bug is also present in the v1.06 code.
     34;
    2835; # Fixed Installer to handle packed hideparttable #
    29 ;   Hide partition configuration is now preserved when upgrading
    30 ;   Implemented upgrading from v1.06 to v1.0.8
    31 ;   Implemented upgrading from v1.07 to v1.0.8
     36;   Implemented upgrading from v1.06 directly to v1.0.8.
     37;   Fixed minor stuff when upgrading from v1.06 to v1.07.
     38;   Hide partition configuration is now preserved when upgrading.
     39;   Fixed minor display bug when SPT < 63.
    3240;
    3341; # Implemented DOS code in C cross-platform installer
     
    3745;   DOS Installer is now AIRBOOTD.EXE.
    3846;
    39 ; v1.0.8-pre-rc2-bld20120330
    40 ; --------------------------
    4147; # Merged 16-bit Assembler bitfield code to the Installer #
    4248;   The installer needs to handle the v1.0.8 configuration.
  • trunk/BOOTCODE/REGULAR/STD_TEXT.ASM

    r47 r48  
    5555             db BLDLVL_MINOR_VERSION,' - (c) '
    5656             db BLDLVL_YEAR
    57              db ' M. Kiewitz  <<Internal Release 2q>> (bld: '
     57             ;~ db ' M. Kiewitz  <<Internal Release 2q>> (bld: '
     58             db ' M. Kiewitz  <<Release Candidate 2>> (bld: '
    5859             db BLDLVL_YEAR
    5960             db BLDLVL_MONTH
  • trunk/BOOTCODE/VERSION.INC

    r47 r48  
    1717AB_YEAR             EQU     2012h
    1818AB_MONTH            EQU     04h
    19 AB_DAY              EQU     21h
     19AB_DAY              EQU     23h
    2020
    2121; The Hours, Minutes and Seconds, again in BCD for easy manipulation.
    22 AB_HOURS            EQU     08h
    23 AB_MINUTES          EQU     35h
     22AB_HOURS            EQU     19h
     23AB_MINUTES          EQU     41h
    2424AB_SECONDS          EQU     00h
    2525
  • trunk/BOOTCODE/_build.cmd

    r47 r48  
    1 @SET ASM=tasm
     1@SET ASM=jwasm
    22@wmake dev
    33@wmake dist
  • trunk/INSTALL/C/INSTALL.C

    r47 r48  
    8484BOOL    Option_ForceConfig      = FALSE;
    8585BOOL    Option_Silent           = FALSE;
    86 
    87 BOOL    Option_CID              = FALSE;    // Rousseau: added
     86BOOL    Option_CID              = FALSE;
    8887
    8988BOOL    Install_Code            = FALSE;
     
    9190BOOL    Install_IsCorrupt       = FALSE;
    9291
    93 USHORT  StatusCode              = 0;
     92//USHORT  StatusCode              = 0;
    9493PSZ     ImpossibleCause         = NULL;
    9594
     
    135134//~ #endif
    136135
    137 
     136void    DumpTrack0();
    138137
    139138// In 32-bit mode EBX is used and in 16-bit mode BX, so we abstract it's name.
     
    207206*/
    208207char    get_bitfield(char* buffer, char index, char fieldwidth) {
     208
    209209    char    rv = 0;
    210210    // These are used to break-up the far pointer in large-data model 16-bit
     
    318318char    set_bitfield(char* buffer, char index, char fieldwidth, char value) {
    319319
     320
    320321    // These are used to break-up the far pointer in large-data model 16-bit
    321322    // code so the buffer can be addressed correctly.
     
    324325    unsigned    dseg = _FP_SEG(buffer);
    325326    unsigned    dptr = _FP_OFF(buffer);
    326 
    327327
    328328    // Prolog code.
     
    475475    USHORT CountHarddrives (void) {
    476476        USHORT NumDrives = 0;
     477
    477478        /* Return the byte at 0040:0075 that contains the nr. of harddisks */
    478479        _asm {
     
    488489    }
    489490
     491    /*
     492    // On DOS this geometry check uses the INT13X value for sectors per track.
     493    // On OS/2 the DosDevIOCtl call uses a SPT value from the formatted disk,
     494    // irrespective of the physical geometry.
     495    */
    490496    BOOL HarddriveCheckGeometry (void) {
    491497        BOOL    rv = FALSE;
     498
    492499        _asm {
    493500            ; According to Ralf Brown ES:DI=0000:0000 to avoid BIOS quirks.
     
    517524        end:
    518525            mov     ax,dx           ; Status to AX.
    519             xor     dx,dx           ; High word to zero.
    520 
    521             ; Store in return value (OS/2 BOOL is 32-bits).
     526
     527            ; Store in return value.
    522528            mov     word ptr [rv],ax
    523             mov     word ptr [rv+2],dx
    524529
    525530            ; Restore ES:DI
     
    527532            pop     es
    528533        }
    529 
    530534        return rv;
    531535    }
     
    559563        end:
    560564            mov     ax,dx           ; Status to AX.
    561             xor     dx,dx           ; High word to zero.
    562 
    563             ; Store in return value (OS/2 BOOL is 32-bits).
     565
     566            ; Store in return value.
    564567            mov     word ptr [Success],ax
    565             mov     word ptr [Success+2],dx
    566568
    567569            ; Restore ES.
     
    598600        end:
    599601            mov     ax,dx           ; Status to AX.
    600             xor     dx,dx           ; High word to zero.
    601 
    602             ; Store in return value (OS/2 BOOL is 32-bits).
     602
     603            ; Store in return value.
    603604            mov     word ptr [Success],ax
    604             mov     word ptr [Success+2],dx
    605605
    606606            ; Restore ES.
     
    681681    }
    682682
     683    /*
     684    // On DOS this geometry check uses the INT13X value for sectors per track.
     685    // On OS/2 the DosDevIOCtl call uses a SPT value from the formatted disk,
     686    // irrespective of the physical geometry.
     687    */
    683688    BOOL HarddriveCheckGeometry (void) {
    684689        USHORT               IOCTLHandle;
     
    13971402
    13981403
     1404void    DumpTrack0() {
     1405    int i,j;
     1406    for (i=27; i<32; i++) {
     1407        for (j=0; j<16; j++) {
     1408            printf("%02X",Track0[i*16+j]);
     1409        }
     1410        printf("\n");
     1411    }
     1412}
     1413
     1414
     1415
    13991416
    14001417void    DoDebug() {
     
    14131430
    14141431    // Dump Track0
    1415     {
    1416         int i;
    1417         for (i=0; i<512; i++) {
    1418             printf("%02X",Track0[i]);
    1419         }
    1420     }
     1432    DumpTrack0();
    14211433    printf("\n\n");
    14221434    // Dump Bootcode
    1423     {
    1424         int i;
    1425         for (i=0; i<512; i++) {
    1426             printf("%02X",Bootcode[i]);
    1427         }
    1428     }
    1429     printf("\n\n");
     1435    //~ {
     1436        //~ int i;
     1437        //~ for (i=0; i<512; i++) {
     1438            //~ printf("%02X",Bootcode[i]);
     1439        //~ }
     1440    //~ }
     1441    //~ printf("\n\n");
    14301442
    14311443    t0codv = Track0[13] << 8 | Track0[14];
     
    14611473    BOOL    ExitOnly        = FALSE;
    14621474    CHAR    TempSpace[MAXCMDPARMLEN+1];
     1475
     1476
     1477    // Check commandline parameters
     1478    CurArgument = 1;
     1479    while (CurArgument<argc) {
     1480        StartPos = argv[CurArgument];
     1481        ArgumentLen = strlen(StartPos);
     1482
     1483        if (((*StartPos=='-') || (*StartPos=='/')) && (ArgumentLen>1)) {
     1484            StartPos++; ArgumentLen--;
     1485            if (ArgumentLen>MAXCMDPARMLEN)
     1486                ArgumentLen = MAXCMDPARMLEN;
     1487            strncpy((char *) TempSpace, StartPos, ArgumentLen);
     1488            TempSpace[ArgumentLen] = 0;
     1489            StartPos = (PCHAR) TempSpace;
     1490            while (*StartPos!=0) {
     1491                *StartPos = tolower(*StartPos); StartPos++;
     1492            }
     1493            if (strcmp((char *) TempSpace, "forcecode")==0) Option_ForceCode = TRUE;
     1494            if (strcmp((char *) TempSpace, "forceconfig")==0) Option_ForceConfig = TRUE;
     1495            if (strcmp((char *) TempSpace, "silent")==0) Option_Silent = TRUE;
     1496            if (strcmp((char *) TempSpace, "cid")==0) Option_CID = TRUE;
     1497        }
     1498        CurArgument++;
     1499    }
     1500
     1501
     1502// Only support /cid on OS/2 for the moment.
     1503// The DOS code behaves quirky with /cid and Win32 is not tested at all.
     1504#ifndef PLATFORM_OS2
     1505    Option_CID = FALSE;
     1506#endif
     1507
     1508    if (Option_CID) {
     1509        Option_Silent = TRUE;
     1510    }
    14631511
    14641512
     
    14741522    }
    14751523
     1524
    14761525    // Allocate buffers for Track0 and AIRBOOT.BIN.
    14771526    Track0 = malloc(SECTOR_COUNT * BYTES_PER_SECTOR);
    14781527    Bootcode = malloc(SECTOR_COUNT * BYTES_PER_SECTOR);
     1528
    14791529
    14801530    // Exit of allocation failed.
     
    14911541
    14921542
    1493     // Check commandline parameters
    1494     CurArgument = 1;
    1495     while (CurArgument<argc) {
    1496         StartPos = argv[CurArgument];
    1497         ArgumentLen = strlen(StartPos);
    1498 
    1499         if (((*StartPos=='-') || (*StartPos=='/')) && (ArgumentLen>1)) {
    1500             StartPos++; ArgumentLen--;
    1501             if (ArgumentLen>MAXCMDPARMLEN)
    1502                 ArgumentLen = MAXCMDPARMLEN;
    1503             strncpy((char *) TempSpace, StartPos, ArgumentLen);
    1504             TempSpace[ArgumentLen] = 0;
    1505             StartPos = (PCHAR) TempSpace;
    1506             while (*StartPos!=0) {
    1507                 *StartPos = tolower(*StartPos); StartPos++;
    1508             }
    1509             if (strcmp((char *) TempSpace, "forcecode")==0) Option_ForceCode = TRUE;
    1510             if (strcmp((char *) TempSpace, "forceconfig")==0) Option_ForceConfig = TRUE;
    1511             if (strcmp((char *) TempSpace, "silent")==0) Option_Silent = TRUE;
    1512             if (strcmp((char *) TempSpace, "cid")==0) Option_CID = TRUE;
    1513         }
    1514         CurArgument++;
    1515     }
    1516 
    1517     if (Option_CID) {
    1518         Option_Silent = TRUE;
    1519     }
    1520 
    15211543#ifdef PLATFORM_WINNT
    15221544    if (CheckWindowsVersion()==FALSE)
     
    15451567        printf(" - Loading MBR from harddisc...");
    15461568    }
    1547     if (HarddriveCheckGeometry()) {
     1569
     1570
     1571    if (!Track0Load()) {
     1572        if (!Option_CID) {
     1573            printf("LOAD ERROR!\n");
     1574        }
     1575        return 1;
     1576    }
     1577    else {
     1578       if (!Option_CID) {
     1579            printf("ok\n");
     1580        }
     1581    }
     1582
     1583    if (!HarddriveCheckGeometry()) {
    15481584        // No EZ-SETUP check here, because we are under 32-bit OS and this
    15491585        //  wouldn't make any sense
    1550         if (!Track0Load()) {
    1551             if (!Option_CID) {
    1552                 printf("LOAD ERROR!\n");
    1553             }
    1554             return 1;
    1555         }
    1556     }
    1557     else {
    1558         StatusCode = STATUS_IMPOSSIBLE;
    1559         if (!Option_CID) {
    1560             ImpossibleCause = "unable to install\n   Your harddisc does not have at least 63 sectors per track.";
    1561         }
    1562     }
    1563 
    1564     if (!Option_CID) {
    1565         printf("ok\n");
     1586        //printf("\nDEBUG: STATUS_IMPOSSIBLE\n");
     1587        Status_Code = STATUS_IMPOSSIBLE;
     1588        ImpossibleCause = "unable to install\n   Your harddisc does not have at least 63 sectors per track.";
    15661589    }
    15671590
     
    15761599    }
    15771600    Status_PrintF(Status_Code, Installed_CodeVersion);
    1578     if (StatusCode==STATUS_IMPOSSIBLE)
     1601    if (Status_Code==STATUS_IMPOSSIBLE)
    15791602        return 1;
    15801603    Status_CheckConfig();
     
    17031726    }
    17041727
     1728
     1729
    17051730    if (Option_Silent || Option_CID) {
    17061731        // Silent operation? Always add AiR-BOOT then
     
    17321757                        printf(" þ Writing AiR-BOOT code...");
    17331758                    }
     1759                    //~ DumpTrack0();
    17341760                    Install_WriteCode();
     1761                    //~ DumpTrack0();
    17351762                    if (!Option_CID) {
    17361763                        printf("ok\n");
     
    17471774                }
    17481775
     1776
    17491777                if (!Track0Write()) {
    17501778                    if (!Option_CID) {
     
    17531781                    return 1;
    17541782                }
     1783
    17551784                if (!Option_CID) {
    17561785                    printf("\n");
  • trunk/INSTALL/C/INSTALL.C-cid-quirk

    r47 r48  
    8484BOOL    Option_ForceConfig      = FALSE;
    8585BOOL    Option_Silent           = FALSE;
    86 
    87 BOOL    Option_CID              = FALSE;    // Rousseau: added
     86BOOL    Option_CID              = FALSE;
    8887
    8988BOOL    Install_Code            = FALSE;
     
    9190BOOL    Install_IsCorrupt       = FALSE;
    9291
    93 USHORT  StatusCode              = 0;
     92//USHORT  StatusCode              = 0;
    9493PSZ     ImpossibleCause         = NULL;
    9594
     
    135134//~ #endif
    136135
    137 
     136void    DumpTrack0();
    138137
    139138// In 32-bit mode EBX is used and in 16-bit mode BX, so we abstract it's name.
     
    207206*/
    208207char    get_bitfield(char* buffer, char index, char fieldwidth) {
     208
    209209    char    rv = 0;
    210210    // These are used to break-up the far pointer in large-data model 16-bit
     
    318318char    set_bitfield(char* buffer, char index, char fieldwidth, char value) {
    319319
     320
    320321    // These are used to break-up the far pointer in large-data model 16-bit
    321322    // code so the buffer can be addressed correctly.
     
    324325    unsigned    dseg = _FP_SEG(buffer);
    325326    unsigned    dptr = _FP_OFF(buffer);
    326 
    327327
    328328    // Prolog code.
     
    475475    USHORT CountHarddrives (void) {
    476476        USHORT NumDrives = 0;
     477
    477478        /* Return the byte at 0040:0075 that contains the nr. of harddisks */
    478479        _asm {
     
    488489    }
    489490
     491    /*
     492    // On DOS this geometry check uses the INT13X value for sectors per track.
     493    // On OS/2 the DosDevIOCtl call uses a SPT value from the formatted disk,
     494    // irrespective of the physical geometry.
     495    */
    490496    BOOL HarddriveCheckGeometry (void) {
    491497        BOOL    rv = FALSE;
     498
    492499        _asm {
    493500            ; According to Ralf Brown ES:DI=0000:0000 to avoid BIOS quirks.
     
    517524        end:
    518525            mov     ax,dx           ; Status to AX.
    519             xor     dx,dx           ; High word to zero.
    520 
    521             ; Store in return value (OS/2 BOOL is 32-bits).
     526
     527            ; Store in return value.
    522528            mov     word ptr [rv],ax
    523             mov     word ptr [rv+2],dx
    524529
    525530            ; Restore ES:DI
     
    527532            pop     es
    528533        }
    529 
    530534        return rv;
    531535    }
     
    559563        end:
    560564            mov     ax,dx           ; Status to AX.
    561             xor     dx,dx           ; High word to zero.
    562 
    563             ; Store in return value (OS/2 BOOL is 32-bits).
     565
     566            ; Store in return value.
    564567            mov     word ptr [Success],ax
    565             mov     word ptr [Success+2],dx
    566568
    567569            ; Restore ES.
     
    572574    }
    573575
    574     BOOL Track0Write (void) {
     576    ULONG Track0Write (void) {
    575577        BOOL        Success = FALSE;
    576578
     
    598600        end:
    599601            mov     ax,dx           ; Status to AX.
    600             xor     dx,dx           ; High word to zero.
    601 
    602             ; Store in return value (OS/2 BOOL is 32-bits).
     602
     603            ; Store in return value.
    603604            mov     word ptr [Success],ax
    604             mov     word ptr [Success+2],dx
    605 
     605les     bx,[Track0]
     606mov     dx,es
     607mov     ax,bx
     608mov     ax,word ptr [Track0]
     609mov     dx,word ptr [Track0+2]
    606610            ; Restore ES.
    607611            pop     es
    608612        }
    609613
    610         return Success;
     614        //return Success;
    611615    }
    612616
     
    681685    }
    682686
     687    /*
     688    // On DOS this geometry check uses the INT13X value for sectors per track.
     689    // On OS/2 the DosDevIOCtl call uses a SPT value from the formatted disk,
     690    // irrespective of the physical geometry.
     691    */
    683692    BOOL HarddriveCheckGeometry (void) {
    684693        USHORT               IOCTLHandle;
     
    13971406
    13981407
     1408void    DumpTrack0() {
     1409    int i,j;
     1410    for (i=27; i<32; i++) {
     1411        for (j=0; j<16; j++) {
     1412            printf("%02X",Track0[i*16+j]);
     1413        }
     1414        printf("\n");
     1415    }
     1416}
     1417
     1418
     1419
    13991420
    14001421void    DoDebug() {
     
    14131434
    14141435    // Dump Track0
    1415     {
    1416         int i;
    1417         for (i=0; i<512; i++) {
    1418             printf("%02X",Track0[i]);
    1419         }
    1420     }
     1436    DumpTrack0();
    14211437    printf("\n\n");
    14221438    // Dump Bootcode
    1423     {
    1424         int i;
    1425         for (i=0; i<512; i++) {
    1426             printf("%02X",Bootcode[i]);
    1427         }
    1428     }
    1429     printf("\n\n");
     1439    //~ {
     1440        //~ int i;
     1441        //~ for (i=0; i<512; i++) {
     1442            //~ printf("%02X",Bootcode[i]);
     1443        //~ }
     1444    //~ }
     1445    //~ printf("\n\n");
    14301446
    14311447    t0codv = Track0[13] << 8 | Track0[14];
     
    14611477    BOOL    ExitOnly        = FALSE;
    14621478    CHAR    TempSpace[MAXCMDPARMLEN+1];
     1479
     1480
     1481    // Check commandline parameters
     1482    CurArgument = 1;
     1483    while (CurArgument<argc) {
     1484        StartPos = argv[CurArgument];
     1485        ArgumentLen = strlen(StartPos);
     1486
     1487        if (((*StartPos=='-') || (*StartPos=='/')) && (ArgumentLen>1)) {
     1488            StartPos++; ArgumentLen--;
     1489            if (ArgumentLen>MAXCMDPARMLEN)
     1490                ArgumentLen = MAXCMDPARMLEN;
     1491            strncpy((char *) TempSpace, StartPos, ArgumentLen);
     1492            TempSpace[ArgumentLen] = 0;
     1493            StartPos = (PCHAR) TempSpace;
     1494            while (*StartPos!=0) {
     1495                *StartPos = tolower(*StartPos); StartPos++;
     1496            }
     1497            if (strcmp((char *) TempSpace, "forcecode")==0) Option_ForceCode = TRUE;
     1498            if (strcmp((char *) TempSpace, "forceconfig")==0) Option_ForceConfig = TRUE;
     1499            if (strcmp((char *) TempSpace, "silent")==0) Option_Silent = TRUE;
     1500            if (strcmp((char *) TempSpace, "cid")==0) Option_CID = TRUE;
     1501        }
     1502        CurArgument++;
     1503    }
     1504
     1505printf("1> c:%d, s:%d\n", Option_CID, Option_Silent);
     1506
     1507    if (Option_CID) {
     1508        Option_Silent = TRUE;
     1509    }
     1510
     1511printf("2> c:%d, s:%d\n", Option_CID, Option_Silent);
     1512
     1513//exit(1);
    14631514
    14641515
     
    14741525    }
    14751526
     1527
    14761528    // Allocate buffers for Track0 and AIRBOOT.BIN.
    14771529    Track0 = malloc(SECTOR_COUNT * BYTES_PER_SECTOR);
    14781530    Bootcode = malloc(SECTOR_COUNT * BYTES_PER_SECTOR);
     1531
     1532    printf("TRACK0   : %08lX\n", Track0);
     1533    printf("BOOTCODE : %08lX\n", Bootcode);
     1534
    14791535
    14801536    // Exit of allocation failed.
     
    14911547
    14921548
    1493     // Check commandline parameters
    1494     CurArgument = 1;
    1495     while (CurArgument<argc) {
    1496         StartPos = argv[CurArgument];
    1497         ArgumentLen = strlen(StartPos);
    1498 
    1499         if (((*StartPos=='-') || (*StartPos=='/')) && (ArgumentLen>1)) {
    1500             StartPos++; ArgumentLen--;
    1501             if (ArgumentLen>MAXCMDPARMLEN)
    1502                 ArgumentLen = MAXCMDPARMLEN;
    1503             strncpy((char *) TempSpace, StartPos, ArgumentLen);
    1504             TempSpace[ArgumentLen] = 0;
    1505             StartPos = (PCHAR) TempSpace;
    1506             while (*StartPos!=0) {
    1507                 *StartPos = tolower(*StartPos); StartPos++;
    1508             }
    1509             if (strcmp((char *) TempSpace, "forcecode")==0) Option_ForceCode = TRUE;
    1510             if (strcmp((char *) TempSpace, "forceconfig")==0) Option_ForceConfig = TRUE;
    1511             if (strcmp((char *) TempSpace, "silent")==0) Option_Silent = TRUE;
    1512             if (strcmp((char *) TempSpace, "cid")==0) Option_CID = TRUE;
    1513         }
    1514         CurArgument++;
    1515     }
    1516 
    1517     if (Option_CID) {
    1518         Option_Silent = TRUE;
    1519     }
     1549printf("3> c:%d, s:%d\n", Option_CID, Option_Silent);
     1550
    15201551
    15211552#ifdef PLATFORM_WINNT
     
    15301561        return 3;   // Rouseau: changed from 1 to 3
    15311562    }
    1532 
     1563printf("4> c:%d, s:%d\n", Option_CID, Option_Silent);
    15331564    if (!Option_CID) {
    15341565        printf(" - Loading bootcode from file...");
     
    15451576        printf(" - Loading MBR from harddisc...");
    15461577    }
    1547     if (HarddriveCheckGeometry()) {
     1578printf("5> c:%d, s:%d\n", Option_CID, Option_Silent);
     1579//~ DumpTrack0();
     1580    if (!Track0Load()) {
     1581        if (!Option_CID) {
     1582            printf("LOAD ERROR!\n");
     1583        }
     1584        return 1;
     1585    }
     1586    else {
     1587       if (!Option_CID) {
     1588            printf("ok\n");
     1589        }
     1590    }
     1591//~ DumpTrack0();
     1592    if (!HarddriveCheckGeometry()) {
    15481593        // No EZ-SETUP check here, because we are under 32-bit OS and this
    15491594        //  wouldn't make any sense
    1550         if (!Track0Load()) {
    1551             if (!Option_CID) {
    1552                 printf("LOAD ERROR!\n");
    1553             }
    1554             return 1;
    1555         }
    1556     }
    1557     else {
    1558         StatusCode = STATUS_IMPOSSIBLE;
    1559         if (!Option_CID) {
    1560             ImpossibleCause = "unable to install\n   Your harddisc does not have at least 63 sectors per track.";
    1561         }
    1562     }
    1563 
    1564     if (!Option_CID) {
    1565         printf("ok\n");
     1595        //printf("\nDEBUG: STATUS_IMPOSSIBLE\n");
     1596        Status_Code = STATUS_IMPOSSIBLE;
     1597        ImpossibleCause = "unable to install\n   Your harddisc does not have at least 63 sectors per track.";
    15661598    }
    15671599
     
    15761608    }
    15771609    Status_PrintF(Status_Code, Installed_CodeVersion);
    1578     if (StatusCode==STATUS_IMPOSSIBLE)
     1610    if (Status_Code==STATUS_IMPOSSIBLE)
    15791611        return 1;
    15801612    Status_CheckConfig();
     
    15931625        }
    15941626    }
    1595 
     1627printf("6> c:%d, s:%d\n", Option_CID, Option_Silent);
    15961628    // =============================================================
    15971629    //  PRE-CHECKING, WHAT WE ARE SUPPOSED TO DO...
     
    16771709    }
    16781710
    1679 
     1711printf("7> c:%d, s:%d\n", Option_CID, Option_Silent);
    16801712
    16811713    // =============================================================
     
    17021734        printf(" <Q> - Quit without any change\n");
    17031735    }
     1736
     1737
     1738printf("8> c:%d, s:%d\n", Option_CID, Option_Silent);
    17041739
    17051740    if (Option_Silent || Option_CID) {
     
    17321767                        printf(" þ Writing AiR-BOOT code...");
    17331768                    }
     1769                    //~ DumpTrack0();
    17341770                    Install_WriteCode();
     1771                    //~ DumpTrack0();
    17351772                    if (!Option_CID) {
    17361773                        printf("ok\n");
     
    17461783                    }
    17471784                }
    1748 
    1749                 if (!Track0Write()) {
    1750                     if (!Option_CID) {
     1785                //printf("1\n");
     1786                //DumpTrack0();
     1787                {
     1788                ULONG   rv;
     1789                if (!(rv=Track0Write())) {
     1790                    //~ if (!Option_CID) {
    17511791                        printf("SAVE ERROR!\n");
    1752                     }
     1792                    //~ }
    17531793                    return 1;
    17541794                }
     1795                printf("\n\n\nRV : %08lX\n\n",(ULONG)rv);
     1796                printf("TRACK0   : %08lX\n", Track0);
     1797                printf("BOOTCODE : %08lX\n", Bootcode);
     1798                }
     1799                //printf("2\n");
     1800                //DumpTrack0();
    17551801                if (!Option_CID) {
    17561802                    printf("\n");
     
    18171863        break;
    18181864    }
    1819 
     1865printf("9> c:%d, s:%d\n", Option_CID, Option_Silent);
    18201866    if (ExitOnly) {
    18211867        if (!(Option_CID || Option_Silent)) {
     
    18251871        }
    18261872    }
    1827 
     1873printf("10> c:%d, s:%d\n", Option_CID, Option_Silent);
    18281874    // Free the buffer memory.
    18291875    if (Track0)     free(Track0);
    18301876    if (Bootcode)   free(Bootcode);
    1831 
     1877printf("11> c:%d, s:%d\n", Option_CID, Option_Silent);
    18321878   return 0;
    18331879}
  • trunk/INSTALL/C/INSTALL.H

    r47 r48  
    1515#define     BLDLVL_YEAR             "2012"
    1616#define     BLDLVL_MONTH            "04"
    17 #define     BLDLVL_DAY              "21"
     17#define     BLDLVL_DAY              "23"
    1818// Build time
    19 #define     BLDLVL_HOURS            "08"
    20 #define     BLDLVL_MINUTES          "35"
     19#define     BLDLVL_HOURS            "19"
     20#define     BLDLVL_MINUTES          "41"
    2121#define     BLDLVL_SECONDS          "00"
    2222// Build machine
     
    5151    #define PLATFORM_DOS
    5252    #define PLATFORM_NAME   "DOS"
    53     #include    <os2def.h>      // We use the OS/2 definitions like CHAR etc.
     53    // We use the OS/2 v1.x definitions like CHAR etc.
     54    #include    <os2def.h>
    5455#elif defined(__OS2__) && !defined(OS2)
    5556    // OS/2 platform
     
    6162    #define     INCL_DOSDEVIOCTL
    6263    #include    <os2.h>
    63     #include    <malloc.h>                                                      // Rousseau: added to use getenv()
     64    #include    <malloc.h>
    6465#elif defined(__NT__)
    6566    // Win32 platform
     
    7273    #define     PLATFORM_LINUX
    7374    #define     PLATFORM_NAME   "Linux"
    74     #include    <os2def.h>      // We use the OS/2 definitions like CHAR etc.
     75    // We use the OS/2 v2.x definitions like CHAR etc.
     76    #include    <os2def.h>
    7577#else
    7678    #error Unsupported platform
  • trunk/INSTALL/C/Makefile

    r47 r48  
    2222
    2323#
    24 # Specifies the level of debugging.
    25 # Level 0 is no debugging (release) and each higher level may use other
    26 # assembler / compiler / linker flags and define jammed-in constants
    27 # to influence source assembly / compilation.
     24# Define min and max debug levels.
     25# Level 0 is Release.
    2826#
    2927RELEASE_CODE=0
    3028MAX_DEBUG_LEVEL=2
    31 #DEBUG_LEVEL=1
    32 #DEBUG_LEVEL=$(MAX_DEBUG_LEVEL)
     29
     30#
     31# Specifies the level of debugging.
     32# Comment-out from low to high to increase the debug level.
     33#
     34DEBUG_LEVEL=$(MAX_DEBUG_LEVEL)
     35DEBUG_LEVEL=1
    3336DEBUG_LEVEL=$(RELEASE_CODE)
    3437
     
    256259###############################################################################
    257260$(MODULE)D.EXE: $(MODULE)D.OBJ
    258         $(LNK) $(LNK_FLAGS) file $^&.OBJ name $^. sys dos
     261        $(LNK) $(LNK_FLAGS) op stack=8192 file $^&.OBJ name $^. sys dos
    259262        @wdump $^. > $^&.WDU
    260263        @if exist $^. @echo             $^. $(MSG_SUCCESS)
     
    265268#       @echo.
    266269        @echo TARGET: $^&.EXE   [DOS 16-bits Executable]
    267         $(CC16) $(CC16_FLAGS) -I$(%WATCOM)$(DS)h$(DS)os2 -bt=dos $(BASENAME).C
     270        $(CC16) $(CC16_FLAGS) -I$(%WATCOM)$(DS)h$(DS)os21x -bt=dos $(BASENAME).C
    268271        @wdis -fi $^. > $^&.WDA
    269272
     
    336339dist:   .SYMBOLIC
    337340        @if exist *.EXE $(CP) *.EXE ..$(DS)..$(DS)RELEASE$(DS)BOOTCODE
     341        @if exist *.ELF $(CP) *.ELF ..$(DS)..$(DS)RELEASE$(DS)BOOTCODE
    338342
    339343
  • trunk/INSTALL/INST_X86/INSTALL.INC

    r47 r48  
    968968TXT_STATUS_Update              db ', but may be updated', 0
    969969TXT_STATUS_Hd2Small            db 'unable to install', 13, 10
    970                                db '   Your harddisc does not have at least 62 sectors per track.', 0
     970                               db '   Your harddisc does not have at least 63 sectors per track.', 0
    971971TXT_STATUS_EZSETUP             db 'not willing to install', 13, 10
    972972                               db '   Your harddisc contains EZ-SETUP.', 13, 10
  • trunk/TOOLS/OS2/SETABOOT/SETABOOT.H

    r47 r48  
    1616#define     BLDLVL_YEAR             "2012"
    1717#define     BLDLVL_MONTH            "04"
    18 #define     BLDLVL_DAY              "21"
     18#define     BLDLVL_DAY              "23"
    1919// Build time
    20 #define     BLDLVL_HOURS            "08"
    21 #define     BLDLVL_MINUTES          "35"
     20#define     BLDLVL_HOURS            "19"
     21#define     BLDLVL_MINUTES          "41"
    2222#define     BLDLVL_SECONDS          "00"
    2323// Build machine
Note: See TracChangeset for help on using the changeset viewer.