Ikrananka Posted November 4, 2020 Share Posted November 4, 2020 (edited) Apologies for the beginners question, but is there a simple way to read a tile from the pattern table and then to mirror, flip or rotate it before displaying onscreen (in assembly)? Or is it necessary to create separate tiles for each different one. By way of example, if I want to place a circle onscreen based on tiles, then I was wondering if I could just have a set of tiles that define one quadrant of the circle and then mirror, flip or rotate those tiles to create the other quadrants. Edited November 4, 2020 by Ikrananka Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted November 4, 2020 Share Posted November 4, 2020 If you have a byte of data and a free byte in RAM, it's always possible to process the byte of data and "construct" the flipped or mirrored version in the free byte, and then send this free byte to VRAM. You need 8 such free bytes to do 90-degree tile rotations. To my knowledge, there's no feature in the VDP or the Coleco BIOS that lets you do this easily. Quote Link to comment Share on other sites More sharing options...
Itchy Scratchy Posted November 4, 2020 Share Posted November 4, 2020 (edited) Here is a bit flipping routine that you should be able to adapt to what you need. Just show me some love if you use it. MIRROR: LD L, A RLCA RLCA XOR L AND 0xAA XOR L LD L, A RLCA RLCA RLCA RRC L XOR L AND 0x66 XOR L RET Edited November 4, 2020 by Itchy Scratchy Quote Link to comment Share on other sites More sharing options...
Ikrananka Posted November 4, 2020 Author Share Posted November 4, 2020 2 hours ago, Pixelboy said: If you have a byte of data and a free byte in RAM, it's always possible to process the byte of data and "construct" the flipped or mirrored version in the free byte, and then send this free byte to VRAM. You need 8 such free bytes to do 90-degree tile rotations. To my knowledge, there's no feature in the VDP or the Coleco BIOS that lets you do this easily. Thanks - I suspected as much. I looked through the VDP datasheet and found nothing there. I understand the methodology you propose but this is likely a bit beyond me at present. I really have only just started to try and learn assembly and still have an awful lot of reading to do before I tackle that kind of byte manipulation. Quote Link to comment Share on other sites More sharing options...
Ikrananka Posted November 4, 2020 Author Share Posted November 4, 2020 (edited) 2 hours ago, Itchy Scratchy said: Here is a bit flipping routine that you should be able to adapt to what you need. Just show me some love if you use it. MIRROR: LD L, A RLCA RLCA XOR L AND 0xAA XOR L LD L, A RLCA RLCA RLCA RRC L XOR L AND 0x66 XOR L RET Thank you ? Unfortunately, I really have only just started to try and learn assembly and still have an awful lot of reading to do before I can hope to really understand that code and adapt it to suit. I'll certainly try - but may end up just defining all of the tiles manually for now and then later improve upon this using variations of the code you've provided. So, thank you for that - having an example to start from will, I'm sure, be a huge help. In the meantime =====> ?❤️?? Edited November 4, 2020 by Ikrananka Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted November 4, 2020 Share Posted November 4, 2020 26 minutes ago, Ikrananka said: In the meantime =====> ?❤️?? Dude, don't lick the guy, we're in a pandemic. Quote Link to comment Share on other sites More sharing options...
Ikrananka Posted November 4, 2020 Author Share Posted November 4, 2020 Just now, Pixelboy said: Dude, don't lick the guy, we're in a pandemic. Well, he did ask for some love and who am I to deny someone of that. Don't worry - I only lick others when wearing a mask ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.