Posts: 13
Threads: 4
Joined: Dec 2004
Code:
'SWITCH TO 800X600X32BPP VIDEO MODE
DETECTVIDEO 800, 600, 32
SETVIDEO
'SETUP COLOR
COLOUR = VAL("&H" + HEX$(BLUE%) + "&H" + HEX$(ALPHA%) + "&H" + HEX$(RED%) + "&H" + HEX$(GREEN%))
' DRAW 32-BIT PIXEL TO SCREEN
MEM16 &HA000, 0, COLOUR, 0
'MOV AX, SEG&
'MOV ES, AX
'MOV WORD PTR [OFF&], DAT&
'RETF RET&
SUB MEM16 (SEG&, OFF&, DAT&, RET&)
DIM ASM AS STRING
ASM = ""
ASM = ASM + CHR$(&HB8) + MKI$(SEG&)
ASM = ASM + CHR$(&H8E) + CHR$(&HC0)
IF LEN(MKI$(OFF&)) < 3 THEN
ASM = ASM + CHR$(&HC7) + CHR$(&H06) + MKI$(OFF&) + MKI$(DAT&)
ELSE
ASM = ASM + CHR$(&HC7) + CHR$(&H06) + MKI$(OFF&) + MKI$(DAT&)
ASM = ASM + CHR$(&HC7) + CHR$(&H06) + MKI$(OFF&+3) + MKI$(DAT&)
END IF
ASM = ASM + CHR$(&HCA) + MKI$(RET&)
DEF SEG = VARSEG(ASM)
CAL ABSOLUTE(SADD(ASM))
DEF SEG
END SUB
Posts: 320
Threads: 24
Joined: Feb 2005
Erm... what? What language is that in? What's the program supposed to do? And, most of all, what do you want out of us?
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Posts: 13
Threads: 4
Joined: Dec 2004
1) The program is written in QBASIC 1.1 for dos.
2) I am using a VESA Lib I programmed about 2 months ago.
3) The program is supposed to plot a 32bpp pixel in the upper left hand counter.
Posts: 1,407
Threads: 117
Joined: Dec 2002
1.-The program may be in QB but you are issuing machine-code instructions, are you asking us to read machine-code? Could you put the assembler instructions as comments in each line for everyone to read?
2.- VESA modes are banked, you can't use a simple memcopy to access the whole screen. There is some bank switching code missing...
3.- You call some DETECTVIDEO and SETVIDEO of your own, you don't post them. Perhaps the problem is there?
4.- What's the problem?
PS: If you need absolutely to use high resolution switch to FB, it will spare you a lot of headaches....
Antoni
Posts: 3,522
Threads: 189
Joined: Dec 2003
Code:
COLOUR = VAL("&H" + HEX$(BLUE%) + "&H" + HEX$(ALPHA%) + "&H" + HEX$(RED%) + "&H" + HEX$(GREEN%))
BARG?
Never heard of that color format..
Anyways, afaik 32bit, or even anything above 8bit, is NOT supported by the VESA standard.. some cards have it, some dont.
Also, VESA is outdated, and wont work on 99.99% of modern computers
Like Antoni said, use FB if you want highres.
Posts: 1,407
Threads: 117
Joined: Dec 2002
You're right, Z!re, VAL will stop reading after the blue value. Perhaps you found the problem, without knowing what it is
Antoni
Posts: 3,522
Threads: 189
Joined: Dec 2003
Quote:You're right, Z!re, VAL will stop reading after the blue value. Perhaps you found the problem, without knowing what it is
I noticed the multiple &H's too, but BARG?.. Just has me stumped
Posts: 13
Threads: 4
Joined: Dec 2004
@Z!re
the code works.....
Posts: 2,765
Threads: 138
Joined: Nov 2002
Quote:@Z!re
the code works.....
okay! it works. and we still don't know what the original problem is/was...
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Posts: 357
Threads: 118
Joined: Oct 2004
If you really need to program using 32 bit colour I would recommend learning FreeBasic, it has native 32bit colour.
f you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows.