File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,25 @@ static uint8 cmos_inb(struct io_handler *hdl,uint16 port) {
155155 else ret = 0 ;
156156 LOG ("Returned CENTURY=%u" ,ret );
157157 ret = bin2bcd (pCtx ,ret );
158- return ret ;
158+ return ret ;
159+ } else if ( pCtx -> indexreg == 0x30 ) { // ExtMem (in K) Low Byte
160+ uint64 rs ;
161+ if ( pCtx -> pSystemCtx -> ramsize > 0xE0000000 ) {
162+ rs = 0xE0000000 ;
163+ } else {
164+ rs = pCtx -> pSystemCtx -> ramsize ;
165+ }
166+ rs -= 1024LL * 1024LL * 16LL ;
167+ return (rs >>10 );
168+ } else if ( pCtx -> indexreg == 0x31 ) { // ExtMem (in K) High Byte
169+ uint64 rs ;
170+ if ( pCtx -> pSystemCtx -> ramsize > 0xE0000000 ) {
171+ rs = 0xE0000000 ;
172+ } else {
173+ rs = pCtx -> pSystemCtx -> ramsize ;
174+ }
175+ rs -= 1024LL * 1024LL * 16LL ;
176+ return (rs >>18 );
159177 } else if ( pCtx -> indexreg == 0x34 ) { // ExtMem Low Byte
160178 uint64 rs ;
161179
You can’t perform that action at this time.
0 commit comments