I patched Bochs to control the A20 line via the bochsrc file

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
OSCASSEMBLY
Posts: 5
Joined: Tue May 19, 2026 10:15 am

I patched Bochs to control the A20 line via the bochsrc file

Post by OSCASSEMBLY »

I patched Bochs so we can control the state of the A20 line via the bochsrc file in a BIOS-independent way.
I made that for me and it turned out to be really helpful.
So you may find it useful too.

Here is my fork on Github:
https://github.com/wewauction-create/Bochs_A20

Take care 1337 fellow
Octocontrabass
Member
Member
Posts: 6274
Joined: Mon Mar 25, 2013 7:01 pm

Re: I patched Bochs to control the A20 line via the bochsrc file

Post by Octocontrabass »

Wouldn't it make more sense to patch the Bochs BIOS rather than Bochs itself?
OSCASSEMBLY
Posts: 5
Joined: Tue May 19, 2026 10:15 am

Re: I patched Bochs to control the A20 line via the bochsrc file

Post by OSCASSEMBLY »

Octocontrabass wrote: ↑Fri Oct 09, 2026 12:11 pm Wouldn't it make more sense to patch the Bochs BIOS rather than Bochs itself?
I said I made that because I wanted a BIOS-independent way of controlling the A20 line.
What if someone wants to use a BIOS that he doesn't have access to it's source code, and it enables the A20 line?
Octocontrabass
Member
Member
Posts: 6274
Joined: Mon Mar 25, 2013 7:01 pm

Re: I patched Bochs to control the A20 line via the bochsrc file

Post by Octocontrabass »

OSCASSEMBLY wrote: ↑Fri Oct 09, 2026 12:16 pmWhat if someone wants to use a BIOS that he doesn't have access to it's source code, and it enables the A20 line?
Does Bochs support any closed-source BIOSes?
User avatar
BenLunt
Member
Member
Posts: 1039
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: I patched Bochs to control the A20 line via the bochsrc file

Post by BenLunt »

Octocontrabass wrote: ↑Fri Oct 09, 2026 12:11 pm Wouldn't it make more sense to patch the Bochs BIOS rather than Bochs itself?
This has been discussed before: https://github.com/bochs-emu/Bochs/pull/911

When I get a chance, I may be able to patch https://github.com/fysnet/i440fx and the make_cmos_image.cc file to do just that. I can look at the standard BIOS included with Bochs, as well.

The idea is a good idea, though I agree, it should be in the BIOS, not in the Bochs tree.
OSCASSEMBLY
Posts: 5
Joined: Tue May 19, 2026 10:15 am

Re: I patched Bochs to control the A20 line via the bochsrc file

Post by OSCASSEMBLY »

Guys it won't hurt
I just thought that it is a good idea to share it

Besides, yes, Bochs support a lot of BIOSes. Some of them are closed source perhaps.
OSCASSEMBLY
Posts: 5
Joined: Tue May 19, 2026 10:15 am

Re: I patched Bochs to control the A20 line via the bochsrc file

Post by OSCASSEMBLY »

BenLunt wrote: ↑Fri Oct 09, 2026 12:46 pm
Octocontrabass wrote: ↑Fri Oct 09, 2026 12:11 pm Wouldn't it make more sense to patch the Bochs BIOS rather than Bochs itself?
This has been discussed before: https://github.com/bochs-emu/Bochs/pull/911

When I get a chance, I may be able to patch https://github.com/fysnet/i440fx and the make_cmos_image.cc file to do just that. I can look at the standard BIOS included with Bochs, as well.

The idea is a good idea, though I agree, it should be in the BIOS, not in the Bochs tree.
Yeah I am the author of that PR
Post Reply