Skip to content

v0.16.0

Latest
Compare
Choose a tag to compare
@skx skx released this 25 Jan 17:45
· 4 commits to master since this release
a75e805

v0.16.0

This release significantly overhauls how we handle the emulation of BIOS and BDOS system-calls:

In the past we'd setup traps on the entry-points of the BDOS address, and the standard entrypoints (0x0000, 0x0005, etc). The idea being that when the instruction pointer landed on those addresses we could examine the CPU registers and determine what action to take out. This worked well unless code was copied over those addresses - for example the system debugger, DDT, would overwrite the addresses with its own code, to allow tracing and that would confuse our emulation.

As of this release we no longer have any memory-based breakpoints, instead we've setup a complete fake BDOS which we poke into RAM, and which is used to trigger the emulator to carry out BIOS and BDOS operations via various "OUT" instructions.

In addition to this overhaul we've also added another console-input driver, a hidden one which isn't documented by default, which allows piping in console input to the emulator. Using this we can paste in input, capture the output of the execution, and thus carry out simple functional testing in addition to the various test functions we've written.

If you've got the cpm-dist repository checked out locally, and you're running Linux/Mac/Unix-like system you can run make test to run the tests interactively. The tests are stored within the test/ directory, so you can see the input they send (the files with .in suffixes) and look at the expected out (the files with a .pat suffix).

Finally we've added a -timeout flag to the CLI, mostly for use in testing but it might be useful to others too.

BugFixes

  • The DMA address is reset on warm and cold boot.
  • The stack pointer is reset on cold-boots.
  • Because we now rely on our custom "bios" and "bdos" allow them to be moved via environmental variables
    • BDOS_ADDRESS=0x1400
    • BIOS_ADDRESS=0x1200
  • DDT.com works fully now we no longer use memory-based breakpoints.

Automated Changelog

  • Emulate BIOS and BDOS calls via OUT instructions by @skx in #180
  • fixed default BIOS/BDOS addresses by @skx in #182
  • Allow input to be scripted by @skx in #184
  • Split functional tests into per-application files by @skx in #187
  • Add timeout flag, for testing. by @skx in #188

Full Changelog: v0.15.0...v0.16.0