Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Need VB help | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
interdpth

Rex
Level: 36

Posts: 234/527
EXP: 294398
For next: 13712

Since: 03-20-04

Since last post: 10 days
Last activity: 31 days
Posted on 09-03-04 11:22 PM Link | Quote
Is there anyone that can teach me how to use bitblt to manipulate and decode graphics from a ROM real time? Tutorials don' t help me much and I can't find a decent commented amount code. Can anyone help?
Gavin

Fuzzy
Rhinoceruses don't play games. They fucking charge your ass.
Level: 43

Posts: 154/799
EXP: 551711
For next: 13335

Since: 03-15-04
From: IL, USA

Since last post: 13 hours
Last activity: 13 hours
Posted on 09-03-04 11:37 PM Link | Quote
well, i think you've got it a tad mixed up. BitBlt is not used to decode or manipulate actual images in the way you're thinking. BitBlt is a fast processing for displaying and painting images.

if you're looking to decode NES/SNES graphics you will have to either code your own stuff, or use an existing dll/class file. TFG has NES and i beleive SNES graphics displaying DLL's. And FrendiedPanda created an NES tile Class in VB. FP's class can be found on my website: http://gavin.panicus.org/ and TFG's can be found on his website: http://tfg.panicus.org/. both are under the 'programming' sections.
interdpth

Rex
Level: 36

Posts: 235/527
EXP: 294398
For next: 13712

Since: 03-20-04

Since last post: 10 days
Last activity: 31 days
Posted on 09-04-04 12:45 AM Link | Quote
Well Actually I wanna know how to decode the graphics then put them into a Picture box or something then be able to maniputlate them do you know what I mean now?
Dish

Spiny
Level: 38

Posts: 121/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 09-04-04 03:02 AM Link | Quote
While looking for a link to a doc which explains the format (of which I was going to add to by supplying some of my own C code to sort of show how to apply it), I came across this link:

http://www.zophar.net/tech/files/vbgfxripping.zip

from this page:

http://www.zophar.net/tech/transdocs.html


The description says "This is a guide by The_Fake_God on how to read graphics from roms with Visual Basic.". I haven't checked it out yet but it seems to be exactly what you're looking for =P
interdpth

Rex
Level: 36

Posts: 238/527
EXP: 294398
For next: 13712

Since: 03-20-04

Since last post: 10 days
Last activity: 31 days
Posted on 09-04-04 03:12 AM Link | Quote
I can still get help here if I dont understand somethings right?
Gavin

Fuzzy
Rhinoceruses don't play games. They fucking charge your ass.
Level: 43

Posts: 155/799
EXP: 551711
For next: 13335

Since: 03-15-04
From: IL, USA

Since last post: 13 hours
Last activity: 13 hours
Posted on 09-04-04 04:18 AM Link | Quote
and if you're going with FP's VB class by chance, i created a small tile editing example a long while ago:


http://gavin.panicus.org/downloads/NesTEE.rar

basically all you have to do with any tile editing/manipulation is alter the array that keeps the tiles, and have the dll/class update them on mouse movement and button presses.
Dish

Spiny
Level: 38

Posts: 122/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 09-04-04 05:17 AM Link | Quote
Originally posted by interdpth
I can still get help here if I dont understand somethings right?


Yah. In fact... I might as well print my previously mentioned code example just in case it might be useful ^^. It's in C, but you -should- be able to apply it (in some form) to VB... although I understand VB lacks some bitwise operators which really help =\. Anyway, something of this sort is what I've found to be the fastest/simplest method to decode NES 2bpp:


int j;
int pixel[8][8];
BYTE a;
BYTE b;
for(j = 0; j < 8; j++)
{
a = ROM[ offset + j ];
b = ROM[ offset + j + 8 ];
pixel[j][0] = ((a >> 7) & 1) | ((b >> 6) & 2);
pixel[j][1] = ((a >> 6) & 1) | ((b >> 5) & 2);
pixel[j][2] = ((a >> 5) & 1) | ((b >> 4) & 2);
pixel[j][3] = ((a >> 4) & 1) | ((b >> 3) & 2);
pixel[j][4] = ((a >> 3) & 1) | ((b >> 2) & 2);
pixel[j][5] = ((a >> 2) & 1) | ((b >> 1) & 2);
pixel[j][6] = ((a >> 1) & 1) | ((b >> 0) & 2);
pixel[j][7] = ((a >> 0) & 1) | ((b << 1) & 2);
}


After that, each byte in the 'pixel' array will be filled with a value from 0 to 3 representing the color of the pixel in the 8x8 image. The array is in [y][x] form, so [0][7] would be the upper right pixel and [7][0] would be the lower left.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Need VB help | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.007 seconds.