Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PutTile16x16 Pixels + Attributes
#26
You don't have enough data, for starters. It's years since I wrote it, so I'm going back to first principles - but right at the very top it says:

' Routine to place a 16 pixel by 16 pixel "Tile" onto the screen at character position x,y from adddress given.
' Data must be in the format of 16 bit rows, followed by attribute data.



So, given I think it requires 68 bytes of data, it's clear that since you're only giving it 64 (scratch that. 32), you're going to get some random colour data.

Also, I think you are giving it UDG, rather than 16 bit rows?

Should be:

0,0, _
63,252, _
64,2, _
67,194 _
79,242, _
...
...
colour byte, colour byte, colour byte, colour byte

I think.



You are also doing a DIM of 32 bytes in your code there, and trying to put 64 bytes into it.... - that's a bit weird. So looks like you are actually defining a 1x2 half circle and giving it 32 bytes of extra data that's ignored? That would explain garbage on screen, I think. As well as the data not being ordered correctly.

Code:
Dim circulo(31)

I don't think you should use an array. I don't know what extra data is in the array that might make it break. I'd just use an ASM block with an @pointer in it. Then it's raw data.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)