Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SCREEN 12
#1
You certainly know this kind of thing :

DEG SEG=&HA000
PEEK (&y*320+x)
DEF SEG

That works perfectly in SCREEN 13 .

But is there a simple way to make it in SCREEN 12 ?
I mean : how can we poke something at a number higher than 64320 ? :???: ( especially in &HA000 , but too in others adresses )
have the simplest tastes of the World : I satisfy myself with the best !

http://ToufQb.free.fr
Reply
#2
No. Screen 13 is chained, which means that the screen is like one big pixel dump. In screen 12, like any 16 color mode, the screen is divided into planes, and each plane has 1 bit per pixel. This planes control red, blue, green and intensity, one bit per pixel for each. So to plot a pixel, you have to make 8 OUT statements to send the plane changes to the VGA register, read the byte containing the pixel you want to plot, figure out its new value and re-blit it. It's easy, but it's slow, QB's routines are much faster than anything you got (the exception is to have your program operate in one plane, but your color options get very limited).
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#3
Because of the planes, however, you can do quite fast puts if it's just a 1 or three colour sprite. See my game Microrush (site below -> QB) for an example of it.

Because the three planes are independent of each other, they don't interfere, so I put the backdrop on one layer, the cursor and particles on one, the enemies on one, and the player on the fourth. It's just a four colour game, but it's blindingly fast (for pureQB) compared to what PSET or PUT could in the same situation. Source is included, I believe.
Reply
#4
*shrug* yeah, there are hacks around it. You can also blit 8 pixels at a time if you know what you're doing. But either way, you're better off using qb's statements for any kind of a rendering involving all 16 colors.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#5
Quote:*shrug* yeah, there are hacks around it. You can also blit 8 pixels at a time if you know what you're doing.
precisely.

Quote:you're better off using qb's statements for any kind of a rendering involving all 16 colors.
obviously. they cheated. it's asm.
Reply
#6
...so bcom45.lib should be programmed in qbasic? I'm all for that.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)