Image Map Image Map
Results 1 to 10 of 10

Thread: Preserving data in RAM while a booter is running

  1. #1

    Default Preserving data in RAM while a booter is running

    For my own purposes I need to test some self-booting IBM PC sofware in a slightly altered environment. More specifically, the idea is to boot first into my own code, which does the following:

    - Copy a small BIOS data table to somewhere in RAM and modify it
    - Target the relevant pointer (in the IVT) at my modified copy
    - Prompt for a new disk (the software I wish to run) and let its boot loader take over

    This should all be fairly straightforward... except for one thing: How to minimize the odds that next program will clobber my data table. I know I can't make it *impossible*, so "somehwat unlikely" will have to do.

    Most booter software doesn't tend to hog every last drop of RAM; so my current idea is to place my table at the top of memory, and reduce the reported memory size in the BIOS Data Area (1K will do) before transferring control to the next program. A reasonably safe approach? Any downsides/other considerations I might be missing?

  2. #2
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    27,635
    Blog Entries
    20

    Default

    Yes, that will work in many cases. At least it worked back in the day of the 5160 with SIMCGA. Later BIOSes may not be so forgiving.

  3. #3

    Default

    Quote Originally Posted by VileR View Post
    For my own purposes I need to test some self-booting IBM PC sofware in a slightly altered environment. More specifically, the idea is to boot first into my own code, which does the following:

    - Copy a small BIOS data table to somewhere in RAM and modify it
    - Target the relevant pointer (in the IVT) at my modified copy
    - Prompt for a new disk (the software I wish to run) and let its boot loader take over

    This should all be fairly straightforward... except for one thing: How to minimize the odds that next program will clobber my data table. I know I can't make it *impossible*, so "somehwat unlikely" will have to do.

    Most booter software doesn't tend to hog every last drop of RAM; so my current idea is to place my table at the top of memory, and reduce the reported memory size in the BIOS Data Area (1K will do) before transferring control to the next program. A reasonably safe approach? Any downsides/other considerations I might be missing?
    basically, what every single bootsector virus ever did. technique is well proven take the addres that int 0x11 returns, reduce by 1kb at top of ram, your golden.

  4. #4
    Join Date
    Aug 2006
    Location
    Chicagoland, Illinois, USA
    Posts
    5,136
    Blog Entries
    1

    Default

    Great, now I can't shake the feeling that VileR is writing a boot virus.
    Offering a bounty for:
    - A working Sanyo MBC-775
    - Documentation and original disks for: Panasonic Sr. Partner, Zenith Z-160 series
    - Music Construction Set, IBM Music Feature edition (has red sticker on front stating IBM Music Feature)
    - Any very old/ugly IBM joystick (such as the Franklin JS-123)

  5. #5
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    27,635
    Blog Entries
    20

    Default

    Oh, c'mon--who in their right might is going to write and distribute a boot sector virus for a 5160 today?

  6. #6

    Default

    Quote Originally Posted by Trixter View Post
    Great, now I can't shake the feeling that VileR is writing a boot virus.
    Much more mundane, I'm afraid It's simply a booter version of that small TSR I put together for DOS to specify different hsync position values for various CGA modes, because on my CRT TV everything's shifted way too far to the left, and you don't always get those convenient "move screen left/right" controls like some games used to have for situations like this.

    (MODE.COM can kinda-sorta fix that under DOS, but even if it wasn't buggy and unreliable, it naturally wouldn't work for booters.)

    Quote Originally Posted by Chuck(G) View Post
    Oh, c'mon--who in their right might is going to write and distribute a boot sector virus for a 5160 today?
    I don't know, but if the media gets wind of this thread we'll have a story about omnipotent Russian haxx0rtrollbots going back in time to retroactively rig the 1984 elections.
    Last edited by VileR; July 2nd, 2018 at 12:35 PM. Reason: for the Season

  7. #7

    Default

    Quote Originally Posted by VileR View Post
    It's simply a booter version of that small TSR I put together for DOS to specify different hsync position values for various CGA modes, because on my CRT TV everything's shifted way too far to the left, and you don't always get those convenient "move screen left/right" controls like some games used to have for situations like this.
    Why not just a normal TSR loaded in your autoexec.cfg? Or do you want it tweaking values before the OS even loads?
    From time to time the accessibility of a website must be refreshed with the blood of owners and designers. It is its natural manure.
    CUTCODEDOWN.COM

  8. #8
    Join Date
    Aug 2006
    Location
    Chicagoland, Illinois, USA
    Posts
    5,136
    Blog Entries
    1

    Default

    He's running booter games (games that boot directly, ie. don't load via DOS).
    Offering a bounty for:
    - A working Sanyo MBC-775
    - Documentation and original disks for: Panasonic Sr. Partner, Zenith Z-160 series
    - Music Construction Set, IBM Music Feature edition (has red sticker on front stating IBM Music Feature)
    - Any very old/ugly IBM joystick (such as the Franklin JS-123)

  9. #9
    Join Date
    Jan 2014
    Location
    Freedom City
    Posts
    5,708
    Blog Entries
    1

    Default

    I'd fix the TV...

    But the days you need an Arduino, laptop, and 3D printer to do that, I guess.

  10. #10

    Default

    Quote Originally Posted by KC9UDX View Post
    I'd fix the TV...

    But the days you need an Arduino, laptop, and 3D printer to do that, I guess.
    If that was a TV problem, the snark would be more on point. It's the picture source (CGA) that needs to be configured, which is why much software that was originally written to run on it (even DOS) included the means to do so. Unless they simply didn't have their Arduinos and 3D printers handy...?

    My TV's got 99 problems, but the hsync position ain't one.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •