matthew180 Posted September 13, 2016 Share Posted September 13, 2016 If the demos are any example then it looks like the tiles could use cm1 or cm2 or something with more colours ? The F18A has a lot of enhancements including what I call "enhanced color mode", or ECM. The F18A can support two and three bits per pixel (ECM2 and ECM3), which gives you 4-color or 8-color tiles. The colors on the F18A come from a programmable 64-entry palette which uses 12-bits per color. Of course ECM2 uses twice as many pattern bytes per tile, and ECM3 uses three times as many bytes. Tiles also support a transparent color, which means 3 colors or 7 colors per tile if transparency is enabled. Tiles can also have priority over sprites, be flipped horizontally or vertically, have their own color information per tile (instead of groups of eight), and more. There is also support for a second tile layer (TL2) that is completely independent of the first tile layer (TL1). TL2 can be above or below TL1, can have transparency colors, be scrolled independently of TL1, etc. Sprites also support ECM2 and ECM3 independently of the ECM setting for TL1 or TL2. Sprites can also have their own size, i.e. 8x8 or 16x16 defined independently instead of globally. Sprites can be automatically "linked", so moving one sprite automatically moves the others. Sprites can also be flipped horizontally and vertically like tiles. There are a lot more features too, here is a post I made describing many of them: http://codehackcreate.com/archives/335 The main thing I need now is how to impletment the offset in c-language for colecovision. To unlock the F18A you will probably need to use some in-line assembly to ensure uninterrupted access to the VDP. I'll see if I can come up with an example. As for scrolling, it is just writing to a single VDP Register (VR) with a number between 0 and 255. There is also a little setup of the scroll registers to specify the page table layer, etc. but that's pretty much it. I don't have any way to code for the CV right now, but I'll try to come up with additional examples. 1 Quote Link to comment Share on other sites More sharing options...
Tursi Posted September 13, 2016 Share Posted September 13, 2016 (edited) Something like this should work... I haven't tested it as we don't use the same libs and I didn't fire up the Coleco, but it's an adaptation of my TI unlock code. (Which, admittedly, takes some shortcuts. Matt may have some recommendations.) I stepped through the library and it looks like it won't have any issue with the extended registers. I was not 100% sure how the library writes blocks to VRAM, so I just used put_vram_pattern. So if it looks weird, that's why. I'd normally do my own VDP access. Also... I couldn't find the function to /read/ a byte of VDP... just 'get_vdp' which claims to need 256 byte blocks...?? Anyway, that's why I threw in the one odd looking function. Feel free to replace it if there is something already. char F18APresent=0; // 0 for no, 1 for yes. Call 'testF18A()' once early on to set it #define VDPRAM_TEST_ADR 0x1c00 // if you change this, also change the test address in the GPU code (0x1c10) const unsigned char GPUTEST[] = { 0x02, 0x00, 0x12, 0x34, // LI R0,>1234 get the test value into register 0 0xC8, 0x00, 0x1C, 0x10, // MOV R0,@>1C10 <-- this is the target test adr in VDP RAM 0x03, 0x40 // IDLE This puts the GPU back to sleep }; // safe delay between VDP operations inline void VDP_SAFE_DELAY() { __asm nop nop nop nop nop __endasm; } // could not find a function in the lib to read a VDP byte? This function reads // two bytes and returns it as an int. // This function MUST NOT be interrupted by status reads. unsigned int vdp_read2(unsigned int adr) { unsigned int ret; volatile __sfr __at 0xbf VDPWA; // VDP write address port volatile __sfr __at 0xbe VDPRD; // VDP read data port VDPWA = (adr&0xff); // send LSB of address (no delay needed) VDPWA = (adr >> ; // send MSB of address (delay needed before read) VDP_SAFE_DELAY(); ret = VDPRD; // get the MSB (delay needed before next read) ret <<= 8; // shift up to MSB (could be optimized to a move, 1uS) VDP_SAFE_DELAY(); // (maybe overkill here, but this function doesn't need to be fast) ret |= VDPRD; // get the LSB return ret; } // note: whatever function you use, the following sequence MUST NOT be interrupted by VDP status reads... // make sure your NMI behaves itself. If it is interrupted, detection will fail. // (I assume) Tank Mission is running my remade nmi which guarantees this. You could also do it in the NMI // or immediately after it. Call this BEFORE setting your VDP registers as it will corrupt them // if it is a TMS9928A. Afterwards you can just test F18APresent. void testF18A() { unsigned char idx; disable_nmi(); // no interruptions // this just tests for presence by running a short GPU program. // it does not check for firmware version, which may matter to some // programs. That would be a good thing to store in F18Present. // Intended as a starting point, not the final! vdp_out(50, 0x80); // reset and lock F18A (or corrupt VDPR2 if 9928A) vdp_out(57, 0x1c); // write unlock value to register 57 (or corrupt VDPR1) vdp_out(57, 0x1c); // repeat to unlock. This is the sequence that mustn't be interrupted // now we copy a little GPU program (9900 Asm) to the VDP and try to execute it. // if it's a TMS9928A, nothing will happen. Otherwise it will change a byte of // VDP RAM for us. put_vram_pattern(VDPRAM_TEST_ADR, GPUTEST, 10, 1); // make sure the test address (0x1c10) is zeroed idx = 0; // convenient bit of memory to read zeros from put_vram_pattern(0x1c10, &idx, 2, 1); // start the GPU program vdp_out(54, VDPRAM_TEST_ADR>>; // MSB in register 54 vdp_out(55, VDPRAM_TEST_ADR&0xff); // LSB in register 55 - GPU starts! // the GPU runs at 100MHz, and will be finished executing long before we can get // back into VDP RAM to check the result. // read the test word at >1C10 back, the GPU should have set it to >1234 idx = vdp_read2(0x1c10); if (idx == 0x1234) { F18APresent = 1; } else { F18APresent = 0; } } To set the scroll register, you should be able to just use vdp_out() to update it, like any other register. Edited September 13, 2016 by Tursi 2 Quote Link to comment Share on other sites More sharing options...
digress Posted September 13, 2016 Author Share Posted September 13, 2016 This is very understandable. If the GPU can execute the program the f18a is present but the original 9928A cannot. Then set a screen mode. Adjust the scroll registers as matthew said. See if I can make it work. I'll have to get my f18a installed first then I'll start making some tests. There is some good info here that would be useful to others . You should also post it in a new thread in the cv programming subforum so it doesn't get lost . Maybe an f18a sticky topic. Quote Link to comment Share on other sites More sharing options...
youki Posted September 13, 2016 Share Posted September 13, 2016 what would be nice to improve development on CV supporting the F18A , is to have an emulator taking it in account. Is there one ready now? Quote Link to comment Share on other sites More sharing options...
Bmack36 Posted September 13, 2016 Share Posted September 13, 2016 I think the best chance for that would be for nanochess to implement it in coolcv. I think he would probably need some help from Matthew on the features that should be implemented. Quote Link to comment Share on other sites More sharing options...
Tursi Posted September 13, 2016 Share Posted September 13, 2016 Yeah, as far as I know only JS99er (TI-99/4A web-based emulator) fully supports the F18A. (http://js99er.net/). I have GPU support in Classic99 (also TI) but I need time to do a rewrite of the VDP system to do the rest. But the author of JS99er is here on AtariAge may be willing to share his VDP code, if that helps. His emulator thread is here: http://atariage.com/forums/topic/224744-js99er/page-1?hl=+js99er Quote Link to comment Share on other sites More sharing options...
matthew180 Posted September 13, 2016 Share Posted September 13, 2016 This is very understandable. If the GPU can execute the program the f18a is present but the original 9928A cannot. That is correct. I did add support for detecting the F18A, but it takes a lot more code. Tursi came up with this method which is much more compact, faster, easier, and the method I would recommend. Then set a screen mode. Adjust the scroll registers as matthew said. See if I can make it work. I'll have to get my f18a installed first then I'll start making some tests. Yes. Just make sure you do the F18A unlock and detection code first, then set VR0..7, then if the F18A was detected set up and/or use any additional VR8..63 as needed. Quote Link to comment Share on other sites More sharing options...
digress Posted September 13, 2016 Author Share Posted September 13, 2016 https://www.youtube.com/watch?v=wF55DSgWtAs I hate it when I do that.... 3 Quote Link to comment Share on other sites More sharing options...
imstarryeyed Posted September 13, 2016 Share Posted September 13, 2016 Wow that is craze awesome, I am amazed how you keep adding awesome things to this game! That takeoff graphic was great!!! Soo looking forward to playing this game!! Quote Link to comment Share on other sites More sharing options...
digress Posted September 30, 2016 Author Share Posted September 30, 2016 F18A Test scrolling on a colecovision I have played with the 2 page setup today with smooth scrolling. It's (The 8 pixel chunky scroll modified with vr27 offsetting) is working reasonably well but glitchy. The 2 page scroll looks great but then all my tile collisions are messed up. The collisions are happening right where they used to be on the screen but are displayed else where such as a rock or bridge or something I bang into. I don't think i'm going to use this on this project but will use it in a future project where I can better plan out how to incorporate the f18a scrolling features and others abilities from scratch. I've uploaded a sample to youtube if you want to check it out. 0:00-1:00 just 2 page scrolling 1:00-1:22 a weird screwup that happens after awhile. 1:22-2:00 the planes with the combined character shifting scroll and vr27 offset 0-7 scroll. 5 Quote Link to comment Share on other sites More sharing options...
digress Posted December 6, 2016 Author Share Posted December 6, 2016 I made up a box! 11 Quote Link to comment Share on other sites More sharing options...
TPR Posted December 6, 2016 Share Posted December 6, 2016 Yay! Quote Link to comment Share on other sites More sharing options...
Bmack36 Posted December 6, 2016 Share Posted December 6, 2016 Looks great. Can't wait to order when it is ready along with Mr. Turtle. Quote Link to comment Share on other sites More sharing options...
Special Teams Posted December 6, 2016 Share Posted December 6, 2016 Very nicely done! Quote Link to comment Share on other sites More sharing options...
Centurion Posted December 6, 2016 Share Posted December 6, 2016 Love it. Looks great digress! Quote Link to comment Share on other sites More sharing options...
Crapahute Posted December 6, 2016 Share Posted December 6, 2016 Great box !! Quote Link to comment Share on other sites More sharing options...
youki Posted December 6, 2016 Share Posted December 6, 2016 Very Nice!!! Quote Link to comment Share on other sites More sharing options...
digress Posted December 9, 2016 Author Share Posted December 9, 2016 Testing a few printouts for size 7 Quote Link to comment Share on other sites More sharing options...
digress Posted January 14, 2017 Author Share Posted January 14, 2017 Pretty much final run throught intermediate level. noticed a couple of minor things that need correcting. I'm going to have it published soon as everything else is done. https://www.youtube.com/watch?v=KRKa0WyCn_M&t=610s 8 Quote Link to comment Share on other sites More sharing options...
Bmack36 Posted January 14, 2017 Share Posted January 14, 2017 Looks great. I'm very excited to play. Are you going to publish F18a Mr. Turtle at the same time? Put me down for both! 1 Quote Link to comment Share on other sites More sharing options...
killersquirel Posted January 14, 2017 Share Posted January 14, 2017 I'm interested in getting a copy of this. I have Mr. Turtle already, but will gladly buy an F18a version of the game as well. 1 Quote Link to comment Share on other sites More sharing options...
+Tarzilla Posted January 14, 2017 Share Posted January 14, 2017 Pretty much final run throught intermediate level. noticed a couple of minor things that need correcting. I'm going to have it published soon as everything else is done. https://www.youtube.com/watch?v=KRKa0WyCn_M&t=610s Looks fantastic. Between this and opcode's f18 support it looks like it is time to mod my system. One small critique tho, I find the dialog boxes like the INFO one at 0:20 very hard to read. First, because the background shows through where there are spaces and second because there is no space between the border and any characters. Right now you have a 12x7 border box, what would look better is a 14x9 box border, then a 12x7 black box inside, then the text inside a 10x5 grid, that would make it much more readable 1 Quote Link to comment Share on other sites More sharing options...
digress Posted January 14, 2017 Author Share Posted January 14, 2017 I'm going to have someone else do the publishing this time otherwise I'll never be able to release it. Havn't been able to look at the mr_turtle since the video a couple of months ago. Won't available at the same time. I would want to update a lot more on that yet and it'll probably be rom only on squibly as most people who would be intersted already have a box version so shipping won't be a concern. I probably will make up a few CIB but not very many as there wouldn't be a lot of newcomers for that title as it's more of an upgrade to f18a rather than a new game. Looks great. I'm very excited to play. Are you going to publish F18a Mr. Turtle at the same time? Put me down for both! I shall look into this. I honestly didn't even notice as I've looked at the screens so many times that I don't even see it anymore. The regular coleco version is on a black bg is why i never noticed. Correcting it now. There is also a problem with sprites being on top from time to time. here is the update to the menu as suggested: https://www.youtube.com/watch?v=iv9R5Z4hbDU&feature=youtu.be Looks fantastic. Between this and opcode's f18 support it looks like it is time to mod my system.One small critique tho, I find the dialog boxes like the INFO one at 0:20 very hard to read. First, because the background shows through where there are spaces and second because there is no space between the border and any characters.Right now you have a 12x7 border box, what would look better is a 14x9 box border, then a 12x7 black box inside, then the text inside a 10x5 grid, that would make it much more readable 2 Quote Link to comment Share on other sites More sharing options...
+davidcalgary29 Posted January 14, 2017 Share Posted January 14, 2017 I'd love to buy this, plus Mr. Turtle, too! I missed out last time. 1 Quote Link to comment Share on other sites More sharing options...
Tursi Posted January 14, 2017 Share Posted January 14, 2017 That's looking amazing 1 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.