1. Re: Waiting for a retrace & svga

>         Does anybody know how to read & write to the vide memory in svga
> modes correctly. What are the rules for a location of a pixel
> then? I think i could easily write a routine which converts my
> compiled sprites to compiled sprites for svga modes. (if the screwed
> up location is the only thing!)

it depends because there is no "rule" for svga modes (which is why we
must suffer with vesa)...  some or linear (such as mode 19) and some
aren't (such as mode 18)...  if they're linear you can poke things
onto video very easily

if they're not linear though, you'll have to do some calculating...
as i understand it, the video memory goes like this (assuming there
are, uh...  4 video pages):

#A0000: pixel (0,0) page 0
#A0001: pixel (0,0) page 1
#A0002: pixel (0,0) page 2
#A0003: pixel (0,0) page 3
#A0004: pixel (1,0) page 0
#A0005: pixel (1,0) page 1

so you can see you'll just have to multiply by the number of video
pages and then add which page you want to access, etc.

there is probably a more "correct" way of determining whether your
video page is linear or not but here's how i'd do it:
- make sure you're on video page zero (using set_active_page() and
set_display_page())
- clear the screen
- poke a pixel to #A0001
- read a pixel (using get_pixel()) from (1,0)
- if the pixel you read is the same as the pixel you put down before,
it's linear...  make sense?

>         With full screen copy and screen clear after EACH sprite i still
> have a frame rate of 170 frames per sec!!!!
>         Can you imagine how it would be if you only copy & clear the screen
> each 100 sprites or so...??

sounds very intruiging :>


 .   o   O  Mike Burrell  O   o   .
.  o O burrellm at geocities.com O o  .
  .  o  O mikpos.base.org O  o  .

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu