Welcome, Guest. Please login or register.


Author Topic: Turning off display in LPT by changing margins? (Read 702 times)

Offline Sdw

  • User
  • *
  • Posts: 50
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 47.0 Firefox 47.0
    • View Profile
Turning off display in LPT by changing margins?
« on: 2016.August.01. 22:31:10 »
I am looking for the simplest way to "turn off" specific lines in a LPT, that is, just display BG color. I will be doing this modification dynamically to a LPT, so the fewer bytes I need to modify, the better!
Messing with the palette entries is no good for 256-color mode, and also in lower color modes it requires several bytes to be modified.
Changing the VRAM-address where gfx is being read is one way to do it, requires 2 bytes of modification per line.
I then read an interesting piece of information in the "Nick Chip Programmers Guide":

If the right margin is set to a lower value than the left margin then the entire mode line will be border colour, with no active display.

I tried this, but at least in EP128Emu having a lower right margin than left margin led to a lot of garbage graphics.

However, having the same value as both left and right (for example 11,11 or 51,51) seems to give the effect I want - the line is empty, and I only have to modify one single byte per line in my LPT to enable/disable display of that line.

Is this a "good" way to do it, or will I be running into problems with that solution?

Online Zozosoft

  • EP addict
  • *
  • Posts: 13505
  • Country: hu
  • OS:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 47.0 Firefox 47.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Turning off display in LPT by changing margins?
« Reply #1 on: 2016.August.01. 22:48:15 »
EXOS set the left margin to 3Fh where no video page displayed (border color visible).

Offline Sdw

  • User
  • *
  • Posts: 50
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 47.0 Firefox 47.0
    • View Profile
Re: Turning off display in LPT by changing margins?
« Reply #2 on: 2016.August.02. 21:27:25 »
That seems to work fine, thank you!