REMINDER - Stay logged in for at least 2 hours a week to get whitelisted.
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)

Getting screen base address ?

News,announcements,programming,fixes,game patches & discussions.
User avatar
exxos
Site Admin
Site Admin
Posts: 28621
Joined: 16 Aug 2017 23:19
Location: UK

Getting screen base address ?

Post by exxos »

What's the best way to get the screen base address of the physical screen ?
User avatar
Cyprian
Posts: 547
Joined: 22 Dec 2017 09:16
Location: Warszawa, Poland

Re: Getting screen base address ?

Post by Cyprian »

1) XBIOS function Physbase:
http://toshyp.atari.org/en/Screen_funct ... l#Physbase

2) TOS variable _v_bas_ad:
$00044E|long |Pointer to video RAM (logical screen base) |_v_bas_ad

3) SHIFTER registers:
$FF8201|byte |Video screen memory position (High byte) |R/W
$FF8203|byte |Video screen memory position (Mid byte) |R/W
$FF820D|byte |Video screen memory position (Low byte) |R/W (STe)
ATW800/2 / V4sa / Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: Getting screen base address ?

Post by thorsten.otto »

_v_bas_ad is the *logical* address, the same that you get by calling Logbase(). It's the one that is used by all VDI drawing operations, as well as by Line-A.

I would prefer using Physbase(), unless you are really short on cycles. Using the hardware addresses may not work with graphics cards (well, directly writing to that memory may not work, either)
User avatar
mfro
Posts: 125
Joined: 13 Dec 2018 07:32

Re: Getting screen base address ?

Post by mfro »

Assuming by what you've shown in the other thread: if you do a GEM application, there is probably no reason to deal with the screen address at all.

What do you need it for?
And remember: Beethoven wrote his first symphony in C.
User avatar
exxos
Site Admin
Site Admin
Posts: 28621
Joined: 16 Aug 2017 23:19
Location: UK

Re: Getting screen base address ?

Post by exxos »

cannot remember why I needed it, but I know I just used logbase to get it.

Return to “SOFTWARE PROGRAMMING & DISCUSSION”

Who is online

Users browsing this forum: ClaudeBot and 7 guests