Changeset 46 for trunk/BOOTCODE/SPECIAL


Ignore:
Timestamp:
Apr 12, 2014, 8:23:32 AM (12 years ago)
Author:
Ben Rietbroek
Message:

Various Changes [2012-04-14]

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!!

Changes

o Added BLDLEVEL support
o Enhanced Master Make
o Sanitized sources
o Support for Wasm and Masm6 (experimental)
o Renamed MBR_PROT.ASM to MBR-PROT.ASM
o Merged bitfield code Into Installer
o First steps for cross platform Installer
o More...

Location:
trunk/BOOTCODE/SPECIAL
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/SPECIAL/F00K/BILLSUXX.ASM

    r40 r46  
    3434MSHACK_ProcessPartTables        Proc Near  Uses ax dx di
    3535   ; Check Overall M$-Hack Enable
    36    test    [CFG_ExtPartitionMShack], 1
     36   test    byte ptr [CFG_ExtPartitionMShack], 1
    3737   jz      MSHPPT_NoMShack
    3838
  • trunk/BOOTCODE/SPECIAL/FAT16.ASM

    r40 r46  
    125125;            ES - Segment, where to read Cluster to
    126126;            DI - Offset, where to read Cluster to
    127 ;       Out: DX - Cluster that follows this one, [ES:DI] filled out
     127;       Out: DX - Cluster that follows this one, es:[DI] filled out
    128128;            DI - Offset, adjusted
    129129; Destroyed: None
  • trunk/BOOTCODE/SPECIAL/FX.ASM

    r40 r46  
    5252FX_CalculateTables              EndP
    5353
    54 ; This routine will dump a color-table to ES:[DI]. Total of 96 bytes.
     54; This routine will dump a color-table to ES:es:[DI]. Total of 96 bytes.
    5555;        In: AX - Color-Separator (RGB, per value 4 bit)
    5656;            DI - Pointer to Buffer for Color-Table
     
    112112;  so the screen will be generated there instead of the current page.
    113113FX_StartScreen                  Proc Near
    114    test    CFG_CooperBars, 1
     114   test    byte ptr [CFG_CooperBars], 1
    115115   jz      FXSS_NoFX
    116    mov     VideoIO_Segment, VideoIO_Page2
     116   mov     word ptr [VideoIO_Segment], VideoIO_Page2
    117117  FXSS_NoFX:
    118118   ret
     
    123123;  copy the new screen to Page 0 and activate it.
    124124FX_EndScreenLeft                Proc Near
    125    test    CFG_CooperBars, 1
     125   test    byte ptr [CFG_CooperBars], 1
    126126   jnz     FXESL_Go
    127127   ret
     
    137137      mov     ax, VideoIO_Page2
    138138      call    VideoIO_RestoreFrom
    139       mov     VideoIO_Segment, VideoIO_Page0
     139      mov     word ptr [VideoIO_Segment], VideoIO_Page0
    140140      call    FX_EndScreenInternalCleanUp
    141141   popa
     
    144144
    145145FX_ScrollScreenLeft             Proc Near
    146    mov     FX_WideScrollerCurPos, 640
    147    mov     FX_WideScrollerDirection, 0
    148    mov     FX_WideScrollerAbsDirection, 0
     146   mov     word ptr [FX_WideScrollerCurPos], 640
     147   mov     byte ptr [FX_WideScrollerDirection], 0
     148   mov     byte ptr [FX_WideScrollerAbsDirection], 0
    149149   call    FX_EndScreenInternalGo
    150150   ret
     
    152152
    153153FX_EndScreenRight               Proc Near
    154    test    CFG_CooperBars, 1
     154   test    byte ptr [CFG_CooperBars], 1
    155155   jnz     FXESR_Go
    156156   ret
     
    166166      mov     ax, VideoIO_Page2
    167167      call    VideoIO_RestoreFrom
    168       mov     VideoIO_Segment, VideoIO_Page0
     168      mov     word ptr [VideoIO_Segment], VideoIO_Page0
    169169      call    FX_EndScreenInternalCleanUp
    170170   popa
     
    173173
    174174FX_ScrollScreenRight            Proc Near
    175    mov     FX_WideScrollerCurPos, 0
    176    mov     FX_WideScrollerDirection, 1
    177    mov     FX_WideScrollerAbsDirection, 1
     175   mov     word ptr [FX_WideScrollerCurPos], 0
     176   mov     byte ptr [FX_WideScrollerDirection], 1
     177   mov     byte ptr [FX_WideScrollerAbsDirection], 1
    178178   call    FX_EndScreenInternalGo
    179179   ret
     
    181181
    182182FX_EndScreenInternalGo          Proc Near
    183    mov     FX_WideScrollerSpeed, 1
    184    mov     FX_WideScrollerSpeedState, 1
    185    mov     FX_WideScrollerBounceSpeed, 25
     183   mov     byte ptr [FX_WideScrollerSpeed], 1
     184   mov     byte ptr [FX_WideScrollerSpeedState], 1
     185   mov     byte ptr [FX_WideScrollerBounceSpeed], 25
    186186   ; Check, if this is 1st time call...
    187    inc     FX_UseCount
    188    cmp     FX_UseCount, 1
     187   inc     word ptr [FX_UseCount]
     188   cmp     word ptr [FX_UseCount], 1
    189189   jne     FX_ES_NotFirstTime
    190    mov     FX_OverallTimer, 220
    191    mov     FX_WideScrollerTimer, 93
    192    mov     FX_CooperBarsTimer, 1
     190   mov     word ptr [FX_OverallTimer], 220
     191   mov     word ptr [FX_WideScrollerTimer], 93
     192   mov     word ptr [FX_CooperBarsTimer], 1
    193193   jmp     FX_ES_NowGoMagic
    194194  FX_ES_NotFirstTime:
    195    mov     FX_OverallTimer, 127
    196    mov     FX_WideScrollerTimer, 1
    197    mov     FX_CooperBarsTimer, -1        ; Disable coopers on further goes
     195   mov     word ptr [FX_OverallTimer], 127
     196   mov     word ptr [FX_WideScrollerTimer], 1
     197   mov     word ptr [FX_CooperBarsTimer], -1  ; Disable coopers on further goes
    198198  FX_ES_NowGoMagic:
    199199   call    FX_MakeMagicalStuff
     
    275275      jb      FX_MCS_VerticalLoop
    276276
    277       mov     ax, FX_CooperBarsTimer
     277      mov     ax, [FX_CooperBarsTimer]
    278278      dec     ax
    279279      jnz     FX_MMS_CooperBarsPending
     
    282282      mov     ax, 1
    283283     FX_MMS_CooperBarsPending:
    284       mov     FX_CooperBarsTimer, ax
    285 
    286       mov     ax, FX_WideScrollerTimer
     284      mov     [FX_CooperBarsTimer], ax
     285
     286      mov     ax, [FX_WideScrollerTimer]
    287287      dec     ax
    288288      jnz     FX_MMS_WideScrollerPending
     
    290290      mov     ax, 1
    291291     FX_MMS_WideScrollerPending:
    292       mov     FX_WideScrollerTimer, ax
    293 
    294    dec     FX_OverallTimer
     292      mov     [FX_WideScrollerTimer], ax
     293
     294   dec     word ptr [FX_OverallTimer]
    295295   jnz     FX_MMS_RetraceLoop
    296296   ret
     
    417417
    418418FX_CalculateWideScroller        Proc Near
    419    mov     bx, FX_WideScrollerCurPos
     419   mov     bx, [FX_WideScrollerCurPos]
    420420   ;movzx   cx, FX_WideScrollerSpeed
    421    mov   cl,FX_WideScrollerSpeed
     421   mov   cl, [FX_WideScrollerSpeed]
    422422   mov   ch,0
    423423
    424    test    FX_WideScrollerAbsDirection, 1
     424   test    byte ptr [FX_WideScrollerAbsDirection], 1
    425425   jnz     FXCWS_RIGHT
    426426   jmp     FXCWS_LEFT
     
    428428   ; ================================================== WideScroll: LEFT CALC
    429429  FXCWS_LEFT:
    430    test    FX_WideScrollerSpeedState, 1
     430   test    byte ptr [FX_WideScrollerSpeedState], 1
    431431   jz      FXCWS_LEFT_Bouncing
    432432   or      bx, bx
     
    437437   or      cx, cx
    438438   jnz     FXCWS_DoSpeedThing
    439    mov     FX_WideScrollerSpeedState, 1
    440    mov     FX_WideScrollerDirection, 0
    441    mov     dl, FX_WideScrollerBounceSpeed
     439   mov     byte ptr [FX_WideScrollerSpeedState], 1
     440   mov     byte ptr [FX_WideScrollerDirection], 0
     441   mov     dl, [FX_WideScrollerBounceSpeed]
    442442   shr     dl,1
    443    mov     FX_WideScrollerBounceSpeed, dl
     443   mov     [FX_WideScrollerBounceSpeed], dl
    444444   jmp     FXCWS_DoSpeedThing
    445445
    446446  FXCWS_LEFT_BounceNOW:
    447    mov     cl, FX_WideScrollerBounceSpeed
    448    mov     FX_WideScrollerSpeedState, 0
    449    mov     FX_WideScrollerDirection, 1
     447   mov     cl, [FX_WideScrollerBounceSpeed]
     448   mov     byte ptr [FX_WideScrollerSpeedState], 0
     449   mov     byte ptr [FX_WideScrollerDirection], 1
    450450   jmp     FXCWS_DoSpeedThing
    451451
    452452   ; ================================================= WideScroll: RIGHT CALC
    453453  FXCWS_RIGHT:
    454    test    FX_WideScrollerSpeedState, 1
     454   test    byte ptr [FX_WideScrollerSpeedState], 1
    455455   jz      FXCWS_RIGHT_Bouncing
    456456   cmp     bx, 640 ; 1280
     
    461461   or      cl, cl
    462462   jnz     FXCWS_DoSpeedThing
    463    mov     FX_WideScrollerSpeedState, 1
    464    mov     FX_WideScrollerDirection, 1
    465    mov     dl, FX_WideScrollerBounceSpeed
     463   mov     byte ptr [FX_WideScrollerSpeedState], 1
     464   mov     byte ptr [FX_WideScrollerDirection], 1
     465   mov     dl, [FX_WideScrollerBounceSpeed]
    466466   shr     dl, 1
    467    mov     FX_WideScrollerBounceSpeed, dl
     467   mov     [FX_WideScrollerBounceSpeed], dl
    468468   jmp     FXCWS_DoSpeedThing
    469469
    470470  FXCWS_RIGHT_BounceNOW:
    471    mov     cl, FX_WideScrollerBounceSpeed
    472    mov     FX_WideScrollerSpeedState, 0
    473    mov     FX_WideScrollerDirection, 0
     471   mov     cl, [FX_WideScrollerBounceSpeed]
     472   mov     byte ptr [FX_WideScrollerSpeedState], 0
     473   mov     byte ptr [FX_WideScrollerDirection], 0
    474474   jmp     FXCWS_DoSpeedThing
    475475
    476476   ; ================================================= WideScroll: SPEED CALC
    477477  FXCWS_DoSpeedThing:
    478    test    FX_WideScrollerSpeedState, 1
     478   test    byte ptr [FX_WideScrollerSpeedState], 1
    479479   jnz     FXCWS_SpeedUp
    480480  FXCWS_SpeedDown:
     
    493493  FXCWS_WideScrollNOW:
    494494   xor     ch, ch
    495    test    FX_WideScrollerDirection, 1
     495   test    byte ptr [FX_WideScrollerDirection], 1
    496496   jnz     FXCWS_ScrollRIGHT
    497497   sub     bx, cx
     
    508508   mov     bx, 640 ; 1280
    509509  FXCWS_NotToBig:
    510    mov     FX_WideScrollerCurPos, bx
    511    mov     FX_WideScrollerSpeed, cl
     510   mov     [FX_WideScrollerCurPos], bx
     511   mov     [FX_WideScrollerSpeed], cl
    512512   mov     ax, 160
    513513   call    FX_SetWideLength
  • trunk/BOOTCODE/SPECIAL/LVM.ASM

    r40 r46  
    8585LVM_GetSectorCRC                EndP
    8686
    87 ; Checks DS:[SI], if a valid LVM Signature is found (sets carry in that case)
     87; Checks ds:[SI], if a valid LVM Signature is found (sets carry in that case)
    8888;  This does not check for valid LVM CRC (which also needs to be done)
    8989;        In: DS:SI - Sector that needs to get checked...
     
    9191; Destroyed: None
    9292LVM_CheckSectorSignature        Proc Near
    93    test    [CFG_IgnoreLVM], 1            ; We are supposed to ignore LVM, so
     93   test    byte ptr [CFG_IgnoreLVM], 1            ; We are supposed to ignore LVM, so
    9494   jnz     LVMCSS_InvalidSignature       ;  any sector is bad!
    95    cmp     wptr [si+LocLVM_SignatureStart], 5202h                                ; Rousseau: identify LVM sector
     95   cmp     word ptr [si+LocLVM_SignatureStart], 5202h                                ; Rousseau: identify LVM sector
    9696   jne     LVMCSS_InvalidSignature
    97    cmp     wptr [si+LocLVM_SignatureStart+2], 'BM'
     97   cmp     word ptr [si+LocLVM_SignatureStart+2], 'BM'
    9898   jne     LVMCSS_InvalidSignature
    99    cmp     wptr [si+LocLVM_SignatureStart+4], 'MP'
     99   cmp     word ptr [si+LocLVM_SignatureStart+4], 'MP'
    100100   jne     LVMCSS_InvalidSignature
    101    cmp     wptr [si+LocLVM_SignatureStart+6], 'DF'
     101   cmp     word ptr [si+LocLVM_SignatureStart+6], 'DF'
    102102   jne     LVMCSS_InvalidSignature
    103103   stc
     
    115115LVM_CheckSectorCRC              Proc Near   Uses ax dx
    116116   call    LVM_GetSectorCRC
    117    cmp     ax, wptr [si+LocLVM_CRC]
     117   cmp     ax, word ptr [si+LocLVM_CRC]
    118118   jne     LVMCSCRC_BadCRC
    119    cmp     dx, wptr [si+LocLVM_CRC+2]
     119   cmp     dx, word ptr [si+LocLVM_CRC+2]
    120120   jne     LVMCSCRC_BadCRC
    121121   stc
     
    133133LVM_UpdateSectorCRC            Proc Near   Uses ax dx
    134134   call    LVM_GetSectorCRC
    135    mov     wptr [si+LocLVM_CRC], ax
    136    mov     wptr [si+LocLVM_CRC+2], dx
     135   mov     word ptr [si+LocLVM_CRC], ax
     136   mov     word ptr [si+LocLVM_CRC+2], dx
    137137   ret
    138138LVM_UpdateSectorCRC            EndP
  • trunk/BOOTCODE/SPECIAL/SOUND.ASM

    r30 r46  
    2727
    2828SOUND_PreBootMenu              Proc Near  Uses ax
    29    test    CFG_MakeSound, 1
     29   test    byte ptr [CFG_MakeSound], 1
    3030   jz      SOUND_PreBootMenu_SkipSound
    31    test    StartSoundPlayed, 1
     31   test    byte ptr [StartSoundPlayed], 1
    3232   jnz     SOUND_PreBootMenu_SkipSound
    3333   mov     ax, 1500
     
    3939   mov     ax, 200
    4040   call    SOUND_WaitToSilence
    41    mov     StartSoundPlayed, 1
     41   mov     byte ptr [StartSoundPlayed], 1
    4242  SOUND_PreBootMenu_SkipSound:
    4343   ret
     
    4545
    4646SOUND_ExecuteBoot              Proc Near  Uses ax
    47    test    CFG_MakeSound, 1
     47   test    byte ptr [CFG_MakeSound], 1
    4848   jz      SOUND_ExecuteBoot_SkipSound
    4949   mov     ax, 2000
Note: See TracChangeset for help on using the changeset viewer.