http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What am I doing wrong this time?



Hi,

First I asked about the 400x300 mode, but I finally decided on the 296x220
mode. I modified it a bit, and it worked in Tweak, but when I put it into
my game, the screen just goes dead. Can somebody please tell me what I'm
doing wrong? This is my video code:

setupvga        macro
        mov ax, 13h
        int 10h

        mov dx, 3c2h
        mov al, 0h
        out dx, al
        mov dx, 3c2h
        mov al, 0e3h
        out dx, al

        mov dx, 3d4h
        mov al, 1h
        out dx, al
        mov dx, 3d5h
        mov al, 49h
        out dx, al

        mov dx, 3d4h
        mov al, 4h
        out dx, al
        mov dx, 3d5h
        mov al, 53h
        out dx, al

        mov dx, 3d4h
        mov al, 6h
        out dx, al
        mov dx, 3d5h
        mov al, 0dh
        out dx, al

        mov dx, 3d4h
        mov al, 7h
        out dx, al
        mov dx, 3d5h
        mov al, 3eh
        out dx, al

        mov dx, 3d4h
        mov al, 10h
        out dx, al
        mov dx, 3d5h
        mov al, 0d7h
        out dx, al

        mov dx, 3d4h
        mov al, 11h
        out dx, al
        mov dx, 3d5h
        mov al, 0ach
        out dx, al

        mov dx, 3d4h
        mov al, 12h
        out dx, al
        mov dx, 3d5h
        mov al, 0b7h
        out dx, al

        mov dx, 3d4h
        mov al, 13h
        out dx, al
        mov dx, 3d5h
        mov al, 25h
        out dx, al

        mov dx, 3d4h
        mov al, 15h
        out dx, al
        mov dx, 3d5h
        mov al, 0e7h
        out dx, al

        mov dx, 3d4h
        mov al, 16h
        out dx, al
        mov dx, 3d5h
        mov al, 6h
        out dx, al
endm

plot    macro   x, y, color
        mov ax, y
        mov bx, 292
        mul bx
        add ax, x
        mov si, ax
        mov ax, 0a000h
        mov es, ax
        mov ax, color
        mov [es:si], ax
endm

resetvga        macro
        mov ax, 3h
        int 10h

        mov dx, 3c2h
        mov al, 0h
        out dx, al
endm

One more question: If it works in Tweak, why doesn't it work here? Any
ideas?

Kind regards,

Lionel Pinkhard
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCꫨ please visit:
http://gameprogrammer.com/mailinglist.html