flat assembler
Message board for the users of flat assembler.

Index > Main > New FASM Website+Examples+Graphics!

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
bzdashek



Joined: 15 Feb 2012
Posts: 147
Location: Tolstokvashino, Russia
bzdashek
Thanks for sharing, Uart!

Managed to download the z77 archive, most of the files output nothing - the screen gets blank and that's all, i.e. TILEMAP.EXE
Post 31 Aug 2012, 05:35
View user's profile Send private message Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
AsmGuru: Whatever works for you is the best way for you.

Dex4u: Cool.

bzdzshek: Thanks for letting me know. Does this occur with "DRAW PIXELS.ASM"? If so, there's a problem with DirectDraw. The examples were tested on my netbook with Windows 7 which is all I have now (Had a custom gaming PC in the past but had to sell it). Do you have another PC to try it on? So, you see a black screen then it pauses? When it does this, press Alt-Tab and see if there's a message box.

Anyone else have problems? Has anyone tested Video Poker?
Post 31 Aug 2012, 11:36
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1288
Location: behind the arc
Picnic
uart777 wrote:
Has anyone tested Video Poker?


Hi uart777,

Yes but unfortunately, many of the examples not running on my computer (Windows XP SP3), nor poker.
In those examples which include graphics i'm getting just a blank screen, or diagonal lines and my screen goes wild.
Here is a screenshot from TILEMAP.EXE
Post 31 Aug 2012, 12:16
View user's profile Send private message Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
Picnic: Sorry, you can't view the graphics examples!

Now, I know, it's definitely a problem with DirectDraw (DD.INC). This morning, I tested the draw examples on my neighbor's desktop PC and they work in all different resolutions but when I tested on my neighbor's laptop, the draw examples are displayed as diagonal lines as in that image!

Perhaps it's the "pitch". I didn't take this into consideration, just kind of assumed it would always be width in bytes. I can't think of any other reason why it work on certain video cards but not others.

I'll get it working tonight.
Post 31 Aug 2012, 14:17
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
DirectDraw is kind of absolete since its not been updated after DX7. Its better to use D3D using Sprites or even better, Texture Quads.

Here an example of 2d sprites using D3D Texture Quads
http://www.gamedev.net/page/reference/index.html/_/technical/directx-and-xna/2d-in-direct3d-using-textured-quads-r1972

Its the most powerfull thing for 2d games you get with directX
Post 31 Aug 2012, 15:37
View user's profile Send private message Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
See update below...


Last edited by uart777 on 01 Sep 2012, 08:05; edited 1 time in total
Post 31 Aug 2012, 19:43
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1288
Location: behind the arc
Picnic
Hi,

I replaced DD.INC and recompile, the result is much better all examples are running, but i still get some odd horizontal lines flickering. Tested on both my desktop and laptop. Poker game refuses to run, still a blank screen. Take your time and do more extensively tests.

TILEMAP
DRAW ALPHA IMAGE
Post 01 Sep 2012, 06:32
View user's profile Send private message Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
Updated Z77+examples+poker to support video cards that store "junk" in the middle of VGA memory.

* Z77: http://sungod777.zxq.net/z77.zip
* Video Poker: http://sungod777.zxq.net/poker.zip

All examples should work perfectly. Video Poker requires exactly 1024x600 but graphics examples detect current resolution. If there's any problem, please let me know so that I can correct it. Just ignore the HTMLs, site was auto-generated by a FASM utility and will be edited when I get time.

Code:
; update solves pitch/stride issue and increased
; startup time (won't set resolution if DETECT)...

let eax=ddsd,\
[p]=[eax+36],\      ; .lpSurface
ecx=[eax+16],\      ; .lPitch
[vga.pitch]=ecx,\
[s]=[vga], edx=[wb]

; no pitch? linear copy

.if ecx=edx         
  let eax=[wb], eax*[screen.h]
  memory.copy [p], [vga], eax

; pitch, copy individual lines

.else 
  .loop [i]=0 to [screen.h]
    memory.copy [p], [s], [wb]
    let eax=[vga.pitch], [p]+eax,\
    eax=[wb], [s]+eax
  .endl
.end
    


Picnic: Hi. Never seen those horizontal lines. Tested on 4 different PCs so far. Remember, Z77 is version -1 beta
Post 01 Sep 2012, 08:03
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1288
Location: behind the arc
Picnic
I just took a small risk and try the updated package at office server.
It's a 64-bit Intel Xeon PC running Windows Server 2008 R2 with nvidia GeForce GTX 560.
None of the graphics example is working except DRAW BOXES & DRAW PIXELS.

uart777 wrote:
Remember, Z77 is version -1 beta

I'm sure that eventually you will locate and fix all problems, congrats for your work by the way.
Post 01 Sep 2012, 09:48
View user's profile Send private message Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
Z77 graphics have always worked 100% on my netbook which I've had for the last 3 years. If I had your PC, I could fix the problem you are experiencing, but it's impossible to diagnose such problems on a PC that doesn't have them. Understand?

My portable X86 graphics files - DRAW.INC, COLOR.INC, CLIP.INC - have worked since the days of DOS. They are truly low-level like rep movsd, memory.copy, text.copy. DirectDraw (DD.INC) is separate from this.

Sadly, my code didn't get the kinds of positive reactions and responses that I was hoping for and it's obvious that I'm wasting my precious time here. So, I've decided to leave the message board permanently.

Thanks to everyone for trying Z77!

Code:
include 'z.inc'

code
say 'Bye'
exit
    
Post 01 Sep 2012, 13:40
View user's profile Send private message Reply with quote
hopcode



Joined: 04 Mar 2008
Posts: 563
Location: Germany
hopcode
uart777 wrote:
Sadly, my code didn't get the kinds of positive reactions and responses that I was hoping for and it's obvious that I'm wasting my precious time here. So, I've decided to leave the message board permanently.

uart, it's only a technical matter, the machine is not so smart as it seems, and real-life code
is more crappy as you may imagine.

but people needs here some time to understand and get the code
from the enveloping macros.
as
AsmGuru62 wrote:
Another thing with macros is that the code is hidden.
Imagine you have a loop and it takes a few lines of macros, but in reality the loop does not fit into CPU instruction cache and every iteration
causes a delay. These cases are not obvious.

that is not an option. and i may provide links on this same board where whetever fine and good stuff
macros make the code opaque. ergo one needs some time to realize what the code does.
please! dont give it up!
surprise this poor being, answer me... Wink
are you there, uart ?
Are you experienced ?

_________________
⠓⠕⠏⠉⠕⠙⠑
Post 01 Sep 2012, 14:34
View user's profile Send private message Visit poster's website Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
[ Post removed by author. ]


Last edited by uart777 on 17 Nov 2013, 00:36; edited 1 time in total
Post 03 Sep 2012, 09:29
View user's profile Send private message Reply with quote
hopcode



Joined: 04 Mar 2008
Posts: 563
Location: Germany
hopcode
uart777 wrote:
...don't have much time. At my neighbors house now drinking Bud Lime A Rita and Gallo sweet red wine (my favorite)
...any questions about my code, please ask on my message board: http://sungod.boardhost.com/index.php
mmmh, boom boom, boom tequila. i am very glad you answered me. i knew you couldnt resist the "voodoo child"'s call Wink
this mark your behaviour as extraordinary. people on board
doesent answer me normally after reading a stupid and inhuman cruelty Evil or Very Mad Twisted Evil into my posts.

well, on the other side, as you can state yourself, you received some precious answers in very
few time. afterall you can find lot of graph programming/discussions on board.
if time to mantain the forum in link is expensive, my invitation is to stay here,
because of some discrete traffic board.

you need only some organization and to fix some links (because the search box cannot
refine search queries) or you ask/discuss simply and you receive by email
the link to the discussions directly from the "Master of Puppets".
also dont hesitate, dont give it up !

Regards,
Marc Rainer Kranz

_________________
⠓⠕⠏⠉⠕⠙⠑
Post 04 Sep 2012, 03:21
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.