Is it possible to change the size of the BIOS?

Only for programmers and BIOS gurus with technical questions.
Post Reply
spin
New visitors - please read the rules.
Posts: 1
Joined: Wed Jul 15, 2009 11:08 am

Wed Jul 15, 2009 11:21 am

H!
Is it possible to extend the size of 1Mb to 2Mb BIOS in order to increase the memory for additional modules?
I have a 2Mb flash memory Winbond W29C020-90 which can be programmed.

My Bios
2a5lepac.bin
elhvb_com/mobokive/Archive/Epox/bios/58MVP3C-M.zip

Mainboard
Epox EP-58MVP3C-M
RayeR
New visitors - please read the rules.
Posts: 3
Joined: Sat Jul 18, 2009 3:24 pm

Sat Jul 18, 2009 3:52 pm

It would interest me too.
I guess it would be possible. My theory is:
1) unpack all modules
2) release all modules except system bios (original.tmp usually)
3) extract bootblock - it is the latest 8kB at end of image in uncompressed form, look for header "Award BootBlock BIOS v1.0 Copyright (c) 2000, Award Software, Inc."
4) fill bootblock area with FFh (or zeros?)
5) create 128kB blank file (FFh or zeros?)
6) insert bootblock into last 8kB of this blank file
7) glue the 128kB image (with system module only) together with new 128kB file (bootblock must be at end).
8 ) insert all previously extracted modules with cbrom, check free space that cbrom reports

But I never tried, maybe some further mods needed...
Awbios
New visitors - please read the rules.
Posts: 10
Joined: Mon Jan 20, 2014 6:26 pm

Wed Jan 22, 2014 9:58 pm

I think that you do not need to unpack any modules. I tried increase size 256K to 512K Award bios 6.00PG in this way:

bios.bin 256K = 262144 bytes (40000h)
BootBlock -> 8192 bytes (2000h)
bios.bin-bootblock: 40000-2000=3E000 (253952 bytes)
  • in HEX editor copy BootBlock 8192 bytes to new file second.bin (8192) and replace BootBlock area with zero bytes size 8192. Now my bios.bin is 256K but filled 8192 zero bytes at end file.
  • paste zero bytes size 253952 at the beginning of the file second.bin - now this have 256K
  • in cmd copy binary:

    Code: Select all

    copy /b bios.bin+second.bin newbios.bin
    but this not working and CBROM print null:
    cbrom.png
    cbrom.png (11.14 KiB) Viewed 1227 times
Original size 256K:

Code: Select all

 No. Item-Name         Original-Size   Compressed-Size Original-File-Name
================================================================================
  0. System BIOS       20000h(128.00K) 1331Ah(76.78K)  3IDF.BIN
  1. XGROUP CODE       0D220h(52.53K)  09034h(36.05K)  awardext.rom
  2. CPU micro code    03000h(12.00K)  01B55h(6.83K)   CPUCODE.BIN
  3. ACPI table        03B4Eh(14.83K)  017E8h(5.98K)   ACPITBL.BIN
  4. EPA pattern       0168Ch(5.64K)   002AAh(0.67K)   AwardBmp.bmp
  5. GROUP ROM[ 0]     030E0h(12.22K)  01758h(5.84K)   _EN_CODE.BIN
  6. PCI driver[A]     08000h(32.00K)  04E3Eh(19.56K)  k:\addrom\NCR400.rom
  7. VGA ROM[1]        0A000h(40.00K)  05F82h(23.88K)  i815.vga
  8. LOGO BitMap       4B30Ch(300.76K) 041E0h(16.47K)  fic.bmp

  Total compress code space  = 34000h(208.00K)
  Total compressed code size = 3002Dh(192.04K)
  Remain compress code space = 03FD3h(15.96K)
If increase bios the same way but with decomp block together with boot block now CBROM working OK and report more space:

Code: Select all

 No. Item-Name         Original-Size   Compressed-Size Original-File-Name
================================================================================
  0. System BIOS       20000h(128.00K) 1331Ah(76.78K)  3IDF.BIN
  1. XGROUP CODE       0D220h(52.53K)  09034h(36.05K)  awardext.rom
  2. CPU micro code    03000h(12.00K)  01B55h(6.83K)   CPUCODE.BIN
  3. ACPI table        03B4Eh(14.83K)  017E8h(5.98K)   ACPITBL.BIN
  4. EPA pattern       0168Ch(5.64K)   002AAh(0.67K)   AwardBmp.bmp
  5. GROUP ROM[ 0]     030E0h(12.22K)  01758h(5.84K)   _EN_CODE.BIN
  6. PCI driver[A]     08000h(32.00K)  04E3Eh(19.56K)  k:\addrom\NCR400.rom
  7. VGA ROM[1]        0A000h(40.00K)  05F82h(23.88K)  i815.vga
  8. LOGO BitMap       4B30Ch(300.76K) 041E0h(16.47K)  fic.bmp

  Total compress code space  = 74000h(464.00K)
  Total compressed code size = 3002Dh(192.04K)
  Remain compress code space = 43FD3h(271.96K)
decomp+boot=9000h
bios.bin-9000h: 40000h-9000h=37000h
Modbin also working good but PC boot only to AwardBoot Block probably because can not find decomp block.
Also Award BIOS Editor report too big size decomp block (290816 bytes !!!) if block stay in initial position:
toobig_decomp.png
If move decomp block together with boot block then size is OK 28672+8192=36864 (9000h):
ok_decomp.png
Now with CBROM possible add more modules. This means that in order to increase the size of BIOS you have to move both modules: decomp+boot to end file and probably fix jump to decomp block in main or boot block.
Post Reply