I got a sprite that has a one pixel background boundary so if it moves 1 pixel in any direction it should erase itself.
It works for up and down and moving left but not moving right...leaves a trail but only bottom right corner.
please see video and the minimal code ie left right movement.
Anobium... Is the sprite write correct please? https://www.youtube.com/watch?v=yI_dNADLh4U&feature=youtu.be
I tested by just sending the sprite but changed the table so that the right edge is all white pixels not black and got the image.
This fault has not shown until now due to not erasing sprite but over printing with background pixels surrounding the sprite.
In the picture the vertical line is on the left of the sprite but in the table it's on the right side.
sorted..Not really.
I used for ptr=0 to 576 ;(sprite_width * sprite_height).....0 to 575 tried.
When I look at the ili9341 include file
'''Set the row or column address range for the ILI9341 GLCD
'''@param ILI9341AddressType Address Type (ILI9341_ROW or ILI9341_COLUMN)
'''@param ILI9341Start Starting address
'''@param ILI9341End Ending address
'''@hide
Sub SetAddressWindow_ILI9341( , in _x2 as word, in _y2 as word)
SendCommand_ILI9341(ILI9341_RAMWR); // write to RAM
End Sub
seems I got rid of In _x1 as word, in _y1 as word
but there's something fundamental I don't understand and as anobium wrote the glcd stuff,
he is best to answer.
Your glcd stuff is brill...I just want to steal your code to get what I want to do but not very good at it. This writing data shapes to ili devices might be universal ....or not
but it's faster than pset ing the data.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorted. This is the line---- for ptr=0 to 575 ;(sprite_width * sprite_height)
the table must start at 1 it seems for ptr=1 to 576 ;(sprite_width * sprite_height)
Anobium. you posted start at zero. https://sourceforge.net/p/gcbasic/discussion/579126/thread/8ffff73946/ You were wrong mate.
The sprite is now 100% ok
just that line did my head in....now on to arrays,ha,ha....not http://www.youtube.com/watch?v=tYbtej5KEAghttps
the Sub SetAddressWindow_ILI9341( , in _x2 as word, in _y2 as word) and other stuff is useful and no one else has done it...which is a downer as more people are needed. Gcb can't run off a few people.
Last edit: stan cartwright 2020-02-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I got a sprite that has a one pixel background boundary so if it moves 1 pixel in any direction it should erase itself.
It works for up and down and moving left but not moving right...leaves a trail but only bottom right corner.
please see video and the minimal code ie left right movement.
Anobium... Is the sprite write correct please?
https://www.youtube.com/watch?v=yI_dNADLh4U&feature=youtu.be
Not sure.
You need to examine the first two draw sequences.
I would expect that you have move the sprite XY position before resolving the old sprite.
I tested by just sending the sprite but changed the table so that the right edge is all white pixels not black and got the image.
This fault has not shown until now due to not erasing sprite but over printing with background pixels surrounding the sprite.
In the picture the vertical line is on the left of the sprite but in the table it's on the right side.
Last edit: stan cartwright 2020-02-15
So, all sorted? You know how to proceed?
sorted..Not really.
I used for ptr=0 to 576 ;(sprite_width * sprite_height).....0 to 575 tried.
When I look at the ili9341 include file
'''Set the row or column address range for the ILI9341 GLCD
'''@param ILI9341AddressType Address Type (ILI9341_ROW or ILI9341_COLUMN)
'''@param ILI9341Start Starting address
'''@param ILI9341End Ending address
'''@hide
Sub SetAddressWindow_ILI9341( , in _x2 as word, in _y2 as word)
SendCommand_ILI9341(ILI9341_CASET); // Column addr set
SendData_ILI9341 _x1_H
SendData_ILI9341 _x1
SendData_ILI9341 _x2_H
SendData_ILI9341 _x2
SendCommand_ILI9341(ILI9341_PASET); // Row addr set
SendData_ILI9341 _y1_H
SendData_ILI9341 _y1
SendData_ILI9341 _y2_H
SendData_ILI9341 _y2
SendCommand_ILI9341(ILI9341_RAMWR); // write to RAM
End Sub
seems I got rid of In _x1 as word, in _y1 as word
but there's something fundamental I don't understand and as anobium wrote the glcd stuff,
he is best to answer.
Your glcd stuff is brill...I just want to steal your code to get what I want to do but not very good at it. This writing data shapes to ili devices might be universal ....or not
but it's faster than pset ing the data.
Do I have to set all prameters to use this ili9341 method of writing data ie each line?
I liked when video was in ram...and you can play with ram.
The ssd1306 was a good if small example.
my other hobbies are...less thinking
Sorted. This is the line---- for ptr=0 to 575 ;(sprite_width * sprite_height)
the table must start at 1 it seems for ptr=1 to 576 ;(sprite_width * sprite_height)
Anobium. you posted start at zero. https://sourceforge.net/p/gcbasic/discussion/579126/thread/8ffff73946/ You were wrong mate.
The sprite is now 100% ok
just that line did my head in....now on to arrays,ha,ha....not
http://www.youtube.com/watch?v=tYbtej5KEAghttps
the Sub SetAddressWindow_ILI9341( , in _x2 as word, in _y2 as word) and other stuff is useful and no one else has done it...which is a downer as more people are needed. Gcb can't run off a few people.
Last edit: stan cartwright 2020-02-15
Last edit: stan cartwright 2020-02-16