# HG changeset patch # User boisy # Date 1063820047 0 # Node ID 31463a4ca9bf3fa9f37af44eabe59f2fcbaec67c # Parent 1da8ab9ba433bc5754af3b7db42f678074d20bf0 Added fix to previous attempt to get >512K support working by Robert Gault diff -r 1da8ab9ba433 -r 31463a4ca9bf level2/modules/vdgint.asm --- a/level2/modules/vdgint.asm Wed Sep 17 17:26:37 2003 +0000 +++ b/level2/modules/vdgint.asm Wed Sep 17 17:34:07 2003 +0000 @@ -1697,18 +1697,22 @@ lda #$FF start off with zero screens allocated BA010 inca count up by one ldb (VD.NBlk-VD.HiRes),y get number of blocks + pshs a needed to protect regA; RG. os9 F$AlHRam allocate a screen + puls a bcs DeAll de-allocate ALL allocated blocks on error pshs b save starting block number of the screen andb #$3F keep block BL= block MOD 63 pshs b addb (VD.NBlk-VD.HiRes),y add in the blcok size of the screen + decb in case last block is $3F,$7F,$BF,$FF; RG. andb #$3F (BL+S) mod 63 < BL? (overlap 512k bank) cmpb ,s+ is all of it in this bank? blo BA010 if not, allocate another screen puls b restore the block number for this screen stb ,y VD.HiRes - save starting block number bsr DeMost deallocate all of the other screens + leas a,s move from within DeMost; RG. ldb ,y restore the starting block number again lda $01,x number of blocks @@ -1742,12 +1746,14 @@ DA010 ldb ,y+ get starting block number tfr d,x in X ldb 1,s get size of the screen to de-allocate - OS9 F$DelRAM de-allocate the blocks *** IGNORING ERRORS *** + pshs a needed to protect regA; RG. + os9 F$DelRAM de-allocate the blocks *** IGNORING ERRORS *** + puls a dec ,s count down bne DA010 puls d,y,x restore registers puls a and count of extra bytes on the stack - leas a,s remove blocks from the stack +* leas a,s removed because it yanks wrong data; RG. DA020 rts and exit * Get current screen info for direct writes - added in NitrOS-9