Raster bar?

DOS specific questions.
angros47
Posts: 1508
Joined: Jun 21, 2005 19:04

Raster bar?

Postby angros47 » Aug 29, 2019 17:32

I have found this article:

http://www.hristogueorguiev.com/the-notorious-raster-copper-bar-effect-a-vga-dos-example/

This is a rough attempt to port it to FreeBasic. On DosBox it doesn't seem to work. Anyone wants to try on a real DOS machine?

Code: Select all

#include "dos\dos.bi"

do
   do while(inp(&h3da) and 8):loop
   do until(inp(&h3da) and 8):loop

   for i as integer=1 to 20
      do while(inp(&h3da) and 1):loop
      do until(inp(&h3da) and 1):loop
   next
   out &h3c8, &h0
   out &h3c9, 100
   out &h3c9, 10
   out &h3c9, &h99
   delay(1)
   
   out &h3c8, &h0
   out &h3c9, &h00
   out &h3c9, &h00
   out &h3c9, &h00
   
loop until multikey (1)
angros47
Posts: 1508
Joined: Jun 21, 2005 19:04

Re: Raster bar?

Postby angros47 » Sep 12, 2019 13:18

Ok, I tried it on a machine with Windows XP: it works under the dos prompt (as long as it's used in full screen mode)

Code: Select all

#include "dos\dos.bi"

do
   do while(inp(&h3da) and 8):loop
   do until(inp(&h3da) and 8):loop

   for i as integer=1 to (150+150*sin(timer))
      do while(inp(&h3da) and 1):loop
      do until(inp(&h3da) and 1):loop
   next
   out &h3c8, &h0
   out &h3c9, 100
   out &h3c9, 10
   out &h3c9, &h99
'   delay(1)

   for i as integer=1 to 13
      do while(inp(&h3da) and 1):loop
      do until(inp(&h3da) and 1):loop
   next
   
   out &h3c8, &h0
   out &h3c9, &h00
   out &h3c9, &h00
   out &h3c9, &h00
   
loop until multikey (1)


This variant will make a raster bar that moves up and down. This trick is almost useless nowadays, but it was more important in the past (especially on the Amiga), to extend graphic capabilities

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 21 guests