(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-20-24 09:39 AM
Acmlm's Board - I3 Archive - - Posts by Arthus
Pages: 1 2 3 4 5 6 7 8
User Post
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 04-29-06 09:21 PM, in VB6 Overflowing NES rendering... Link
I found this using Google, it's custom created VB6 Functions that act like the shift functions in C. So how would I use these? Like so?:

RShift(romdata(TileOff1),x)
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 04-30-06 12:52 AM, in VB6 Overflowing NES rendering... Link
Yea well, here is the code I have now, addapted from HH's and some mod's to let VB use it...

Public Sub PaintTile(Buffer As PictureBox)
Dim Bit As Byte
Dim TileOff1 As Long
Dim TileOff2 As Long
'Set colors
Pallette2BPP.Color1 = RGB(51, 0, 134)
Pallette2BPP.Color2 = RGB(191, 115, 0)
Pallette2BPP.Color3 = RGB(0, 207, 255)
Pallette2BPP.Color4 = RGB(239, 235, 180)
TileOff1 = 202192
TileOff2 = 202200
For y = 0 To 7
For x = 0 To 7
Bit = RShift(romdata(TileOff1), x) And 1
Bit = Bit Or LShift((RShift(romdata(TileOff2), x) And 1), 1)
Select Case Bit
Case 0:
Buffer.Line (x * 2, y * 2)-Step(16, 16), Pallette2BPP.Color1, BF
Case 1:
Buffer.Line (x * 2, y * 2)-Step(16, 16), Pallette2BPP.Color2, BF
Case 2:
Buffer.Line (x * 2, y * 2)-Step(16, 16), Pallette2BPP.Color3, BF
Case 3:
Buffer.Line (x * 2, y * 2)-Step(16, 16), Pallette2BPP.Color4, BF
End Select
Next x
TileOff1 = TileOff1 + 1
TileOff2 = TileOff2 + 1
Next y

End Sub


Now I get a division by zero on the bolded line... Can anyone see any problems...

Also, the RShift and the LShift are custom functions from the link I posted before.
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 04-30-06 04:56 AM, in VB6 Overflowing NES rendering... Link
OK, here is the function that it's calling:
Public Function LShift(ByVal lThis As Long, ByVal lBits As Long) As Long
If (lBits <= 0) Then
LShift = lThis
ElseIf (lBits > 63) Then
' ... error ...
ElseIf (lBits > 31) Then
LShift = 0
Else
If (lThis And m_lPower2(31)) = m_lPower2(31) Then
LShift = (lThis And &H7FFFFFFF) \ m_lPower2(lBits) Or m_lPower2(31 - lBits)
Else
LShift = lThis \ m_lPower2(lBits)
End If
End If
End Function


And the bolded is what's causing the error.
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 01:29 AM, in VB6 Overflowing NES rendering... Link
OK, I took Disch's C-Esque code and attempted to turn it into VB, seeing as I don't know how the OutputPixel() function works, I just too a random stab in the dark.

Public Sub PaintTile(Buffer As PictureBox)
Dim a As Byte
Dim b As Byte
Dim y As Integer

offset = 202192

Pallette2BPP.Color1 = RGB(0, 0, 0)
Pallette2BPP.Color2 = RGB(255, 0, 0)
Pallette2BPP.Color3 = RGB(0, 255, 0)
Pallette2BPP.Color4 = RGB(0, 0, 255)

For y = 0 To 7
a = romdata(offset + y)
b = romdata(offset + y + 8)
Buffer.Line (0, y)-Step(((a / 128) & 1), ((b / 64) & 2)), Pallette2BPP.Color1, BF
Buffer.Line (1, y)-Step(((a / 64) & 1), ((b / 32) & 2)), Pallette2BPP.Color2, BF
Buffer.Line (2, y)-Step(((a / 32) & 1), ((b / 16) & 2)), Pallette2BPP.Color3, BF
Buffer.Line (3, y)-Step(((a / 16) & 1), ((b / 8) & 2)), Pallette2BPP.Color4, BF
Buffer.Line (4, y)-Step(((a / 48) & 1), ((b / 4) & 2)), Pallette2BPP.Color1, BF
Buffer.Line (5, y)-Step(((a / 4) & 1), ((b / 2) & 2)), Pallette2BPP.Color2, BF
Buffer.Line (6, y)-Step(((a / 2) & 1), ((b) & 2)), Pallette2BPP.Color3, BF
Buffer.Line (7, y)-Step(((a) & 1), ((b * 2) & 2)), Pallette2BPP.Color4, BF
Next
End Sub


The good news is, it doesn't overflow. The bad news is, it doesn't output anything remotely like the tile it should be. I have attached the tile it outputs.

Attachments

Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 02:04 AM, in VB6 Overflowing NES rendering... Link
I know im telling it to draw red, blue, black and green. But the offset for the tile isn't straight lines. It should come up as a red, blue, black and green houses.
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 02:41 AM, in VB6 Overflowing NES rendering... Link
See, that would be the problem. I don't know any C, I tried it, and I couldn't get anything to work. SO i'll leave that for a little while. I'll try to figure out this bit in VB then.

EDIT: Ok, I tried that, I got this red/black line dealy. Still no pregress, I should learn how exactly the tiles work maybe...


(edited by Arthus on 05-01-06 01:52 AM)
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 07:49 AM, in Hack Database Link
Couldn't you use the attachment system here to upload the IPS/ZIP/RAR? Unless it's bigger than 125kb...
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 11:42 AM, in Sword v0.0000001 Link
Yes it will, that's the whole point of loading from the game.

And yes I do plan to have a side-screen editor. I'm just sick of trying to load these tiles from the ROM.
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 12:03 PM, in VB6 Overflowing NES rendering... Link
Here is an 4-entry array of colors, I assumed an array that has 4 values which are colors. And how to draw a pixel to a box.

' Dims name for array
Dim Pallette2BPP(0 To 3) As Long
' Puts value in array
Pallatte2BPP = Array(RGB(255, 255, 255), RGB(255, 0, 0), RGB(0, 255, 0), RGB(0, 0, 255))
' Makes actual pixel
pic_tiles(0).Line (1, 1)-Step(1, 1), Pallette2BPP(0)


The "BF" means "box", and "filled". Which allows you to make a fully colored box using the color you specify. Here is a more detailed look at the use of the ".Line" statement.
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 12:10 PM, in Hack Database Link
If you desperatly need somewhere to host it, you could send it to me via e-mail/IM or what not, and I will host them.
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 12:31 PM, in VB6 Overflowing NES rendering... Link
OK, tried that, gives out something rather interesting... see attachment below.

Also I shall to the best of my knowledge correct the assumptions:
1) I think if you make the start and end co-ords 0,0. The pixel isn't going anywhere. So I think 0,0 to 1,1 would draw a pixel.

2) Yes, you are correct.

3) OK...

4) OK...

5) Yes, you are correct.

EDIT: I forgot to put in the attachment...


(edited by Arthus on 05-01-06 11:35 AM)
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 12:55 PM, in VB6 Overflowing NES rendering... Link
OK, with some modifications, it seems with teh 1,2,3 it keept on adding on. So just ading 1 was just fine like so:

Buffer.Line (0, y)-Step(1, 1), Palette2BPP( etc...
Buffer.Line (1, y)-Step(1, 1), Palette2BPP( etc...

With that, I get the attached with what it should be (once I change the colors)

I also might add that all those Pallette2BPP functions return a 0.

Attachments

Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 01:29 PM, in VB6 Overflowing NES rendering... Link
You misread my wording:
"I get the attached with what it should be (once I change the colors)"

Which means, It should output something similar to that, but before I change the colors to match it the same as the desired pixel.

And the functions I was refering to were these:
Palette2BPP( ((a / 128) And 1) + ((b / 64) And 2) )

And they are now not returning 0. They are returning numbers like 1677215 and 65280...

Also, i'll look into a put pixel or somthing...
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-01-06 02:02 PM, in VB6 Overflowing NES rendering... Link
But shouldn't they be outputting 0-3 instead of 65280-1677215?
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-02-06 02:49 AM, in Sword v0.0000001 Link
Yea the tiles as a whole. I know where they are as well, but I can't seem to load anything remotly like it.
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-03-06 08:41 AM, in Super Metroid: Redesign Link
Will you be able to go through it normally then later speed run the crap out of it?
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-03-06 10:35 AM, in VB6 Overflowing NES rendering... Link
OK, I'm using the PSet method, and i'm still getting the same result:

Public Sub PaintTile(Buffer As PictureBox)

Palette2BPP = Array(RGB(255, 255, 255), RGB(255, 0, 0), RGB(0, 255, 0), RGB(0, 0, 255))

Dim a As Byte
Dim b As Byte
Dim y As Integer

For y = 0 To 7
offset = 201744

a = romdata(offset + y)
b = romdata(offset + y + 8)
Buffer.PSet (0, y), Palette2BPP(((a / 128) And 1) + ((b / 64) And 2))
Buffer.PSet (1, y), Palette2BPP(((a / 64) And 1) + ((b / 32) And 2))
Buffer.PSet (2, y), Palette2BPP(((a / 32) And 1) + ((b / 16) And 2))
Buffer.PSet (3, y), Palette2BPP(((a / 16) And 1) + ((b / 8) And 2))
Buffer.PSet (4, y), Palette2BPP(((a / 8) And 1) + ((b / 4) And 2))
Buffer.PSet (5, y), Palette2BPP(((a / 4) And 1) + ((b / 2) And 2))
Buffer.PSet (6, y), Palette2BPP(((a / 2) And 1) + (b And 2))
Buffer.PSet (7, y), Palette2BPP((a And 1) + ((b * 2) And 2))

Next

End Sub
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-06-06 03:10 PM, in Super Metroid: Redesign Link
It's Sunday May 7th where I live. Can I have the patch now
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-07-06 02:10 AM, in Super Metroid: Redesign OFFICIALLY RELEASED, Keep all the related questions here Link
We arn't allowed to disclose links to ROM sites of any nature.
Arthus

140


 





Since: 11-17-05
From: Australia

Last post: 6513 days
Last view: 6513 days
Posted on 05-07-06 04:26 AM, in Super Metroid: Redesign OFFICIALLY RELEASED, Keep all the related questions here Link
ZSNES 1.36 works with it.

I feel like a complete tool by asking this... But, where are the bombs?
Pages: 1 2 3 4 5 6 7 8
Acmlm's Board - I3 Archive - - Posts by Arthus


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.017 seconds; used 439.20 kB (max 563.05 kB)