Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - donvito

Pages: [1]
1
awesome!  thanks for the tips rain_storm!

i ended up fooling around with this last night, and managed to make a crazy crazy rainbow static type of effect, but i lost it!

2
hey all, this is what an hour of tinkering got me...

ps, actually its 30bytes :D



Code: [Select]
org 100h
init:
     les si,[bx]   ;0a000h
     mov al,13h    ;video mode 13h
     int 10h

main:
     mov dx,100
     mov cx,100
     mov al,0
l:
     stosd
     add di,100
     inc al
     loop l

exit:
     in al,60h    ;check keys
     dec al       ;put to 0
     jnz main     ;if not 0, rtn to main
     ret          ;goodbye blue sky

please modify if you'd like, but please comment the code, so i can learn!!!

3
ASM / Re: "not cl/cx" causing lockup
« on: February 23, 2010 »
thanks for the explanation rbz! i learned something :D

also, thanks for the exit to textmode code!

im still scouring the net for a vga mode reference guide, so i dont have to just randomly try things to see what happens :D

4
ASM / "not cl/cx" causing lockup
« on: February 23, 2010 »
hey guys, im having a problem with the following bit of code...

this is hacked together from many of the posts and work of others on this site. (im learning :D forgive my sins)

it generates a colored-starry effect, but causes the escape check to fail, any ideas? 

thanks

Code: [Select]
org  100h     ; com file
les si,[bx]   ; ES = 0A000h [video buffer]
mov  dx,03DAh ; DX = v-sync port address
mov al,13h    ; call video mode 13
int 10h

main:in al,dx     ; wait for vertical
     test al,8    ; retrace
     jz   main

draw:and al,ah
     xchg ah,al

     not cl
     xor ax,cx
     and al,ah
     xchg ax,di
     add al,bl
     stosb
     loop draw

exit:in al,60h      ; Escape Pressed? (get keyboard state)
     dec al         ; try to set value to 0
     jnz main       ; If not, go back to main.
     ret            ; if so, exit

5
Freebasic / Re: Timesoldier remake source
« on: September 25, 2008 »
awesome!  :clap:

thanks a lot, the scroller code is really helpful.

EDIT: haha! cock shave...

6
thanks for the tip widowmaker :)
donvito

7
Thanks DragonSpirit and Shockwave!

I'm glad you guys are so eager to give me advice, thats awesome!

donvito

8
Thanks a lot guys!

I'm gonna go get a pot of coffee going and start learning this stuff. :D

its noon here and I'm still drinking coffee.  thats right.

9
Hey all,

I have just started to learn C/C++ and I was wondering if one of you kind/elite souls here on the forums could give me some basic Demo-Specific C/C++ tutorials.

I am interested in learning opengl and/or directx.  It would be really neat if anyone could write some really basic tutorials on scrollers or cool oldschool demo/intro stuff.

Thanks a lot guys,
donvito

P.S. I could/have used google of course, but I think it would be cool if I could be in communication with you guys on the forums here, to show progress/ask for help :D


10
ASM / Re: As simple as it gets
« on: March 03, 2008 »
hmm thats wierd...

i dont really fully understand the code, but if you inc the color or coords, it will make a cool looking "bars" effect.  its just wierd because i was in class and i tried that and it worked without a lockup, but on my comp at home, it locked up hard, and i had to do a hard-reboot.

donvito

11
ASM / Re: As simple as it gets
« on: March 03, 2008 »
sweet shockwave!

i have a wierd issue though, maybe its just something that isnt supposed to be done...

if i add,

add [colour], 1
and/or
inc [xposi]

it works, but i cannot exit.  is that because its looping too much or overflowing the memory or something?

thanks for the help guys
donvito

12
Freebasic / Re: EXTREMELY n00b question...
« on: March 01, 2008 »
Welcome Donvito :)

What you are doing is a great way to get used to the screen buffer. It will just click into place with you the way that a continuous sequence of numbers gets plotted into lines that forms the screen.

The maths for this is pretty simple and what you are making is fine for drawing simple straight lines, there are many many things that can be done to boost the speed for you when you have learned how the screen buffer works.

And please don't apologise for posting any programming question here, they are all welcome.

thanks for the welcome.

Yea, it was kinda like DUH when I saw it in action, and now I have a perfectly centered crosshair haha, cool, maybe...  useless? definitely. :D

I plan on dissecting the scroller tutorial soon.

i love this stuff, very fun.

donvito

13
Freebasic / Re: EXTREMELY n00b question...
« on: February 29, 2008 »
Code: [Select]
FOR A = 0 TO 49
    BUFFER (X+(Y+A)*YRES) = &HFFFFFF
NEXT

sorry for double post but just wanted to say this works, but the yres needs to be xres :D

thanks,
donvito

14
Freebasic / Re: EXTREMELY n00b question...
« on: February 29, 2008 »
Hey guys,

Thanks a lot for both replies, that makes things a lot easier to understand!

Thanks again,
donvito

15
Freebasic / EXTREMELY n00b question...
« on: February 29, 2008 »
Hey guys!

First off, GREAT SITE, I've been looking into learning to code old-school style demos for a long long time, and this site is a great resource.

Basically, I'm sure that my question is going to be ridiculously noobish, but I have to ask.

Essentially, I am trying to modify the "line-drawing" code from the second FB tutorial to make a crosshair in the center of the window. 

So far, I've got it centered, and the "left" and "right" of the crosshair, but I cannot get the vertical lines for some reason, I figured it would involve just using Y in place of X and some tweaking, but I can't figure it out.

I know that it writes from left to right, and I think this is my problem.  I feel like such a n00b, but I've never really done any graphics programming before.

heres the code... 

Quote
WHILE(1)
X = 320
Y = 240

FOR A = 0 TO 49
    BUFFER (X + A +(Y*XRES)) = &HFFFFFF
NEXT

FOR A = 0 TO 49
    BUFFER (X - A +(Y*XRES)) = &HFFFFFF
NEXT

FOR A = 0 TO 49
    BUFFER (Y + A +(X*YRES)) = &HFFFFFF
NEXT


I know that the framework can do this for me, but I like to learn the dirty, long way to do things purely because then I fully understand it.

Thanks for your help guys, I'm happy to be a new member to this community. :D


Pages: [1]