LS_Dracon Posted September 29, 2015 Share Posted September 29, 2015 (edited) I'm testing a kernel like the Atari 2600, where we can update graphics on the fly while electron beam is drawing the image. Unlike on Atari 2600, on Odyssey 2 we can't change the graphics while the video chip is "on", only at vblank time. The trick here is disable the chip before Hblank and enable when the scanline starts, then uses hblank time to made the changes. The processor is really slow, I can change only 1 register every scanline, but this is much better than nothing. I'm still testing, the image shows background color changes (black is the "hblank" area). The difficult here is keep the picture stable, which I did. I can't use whole screen, so the game screen must to stay between two grid lines, that's a "safe area" for display the graphics. If it works like I'm thinking, the possibilities are endless... Edited September 29, 2015 by LS_Dracon 5 Quote Link to comment Share on other sites More sharing options...
Sam Bushman Posted October 11, 2015 Share Posted October 11, 2015 Very cool. I look forward to hearing about your progress on this. What are you using to get code on the Odyssey? Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted October 11, 2015 Author Share Posted October 11, 2015 (edited) I'm not making progress on this, but basically I'm trying to put more objects on screen. Theoretically I can add more text lines or redraw the sprites without a blank area on screen. A good code would use all 4 sprites and draw a bitmap image with 32 pixels wide by many scanlines I want. What are you using to get code on the Odyssey? How to load the code on odyssey? You can check the C7051 flash cart, I don't know where you can buy, BTW. Edited October 11, 2015 by LS_Dracon Quote Link to comment Share on other sites More sharing options...
CatPix Posted October 11, 2015 Share Posted October 11, 2015 (edited) You gotta email rene_G7400 and asks if he still have some for sale. Edited October 11, 2015 by CatPix Quote Link to comment Share on other sites More sharing options...
Sam Bushman Posted October 12, 2015 Share Posted October 12, 2015 You gotta email rene_G7400 and asks if he still have some for sale. Done and one is on the way. Thanks for the suggestion I'm not making progress on this, but basically I'm trying to put more objects on screen. Theoretically I can add more text lines or redraw the sprites without a blank area on screen. That reminds me of how the vine in Pitfall was drawn using the "ball" object on the 2600. Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted April 7, 2016 Author Share Posted April 7, 2016 (edited) Thanks to Kevtris, now I know exactly the timing : Each scanline takes 22.75 processor cycles. This means if you to write 23 NOPs in a row, you skip a scanline. Note the .25 missing, there's no quarter cycle in a processor, so every 4 scanlines you lost a cycle, this means every 3 scanlines you need adjust the timing to 22 cycles only. The kernel is a loop of 23,23,23,22 cycles and repeat. The code works better if you set it after a timer interrupt, which starts more or less on the same position, every frame (it is not pixel perfect). In fact, according Kevtris, each processor cycle takes 10 pixels wide. The jagged black color on screen edges (see the tv picture above) is the missing .25 cycle on each scanline, and then when I remove a cycle it returns to original position. Edit : I'm talking about NTSC machines. I don' know the timing on PAL machines, yet. Edited April 7, 2016 by LS_Dracon Quote Link to comment Share on other sites More sharing options...
CatPix Posted April 7, 2016 Share Posted April 7, 2016 hmmm so even on regular O² games, could those uncomplete cycles cause garbage display on PAL machines? I have some O² carts and ReneG's multicart, and on my euro machine, most NTSC games I tried have a bunch of random garbage displayed down the screen. Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted April 7, 2016 Author Share Posted April 7, 2016 No, it's not related to the processor speed / timing. I think the problem is, you can't disable the chars, so you need to move them out of the screen, if you don't want to show on screen. PAL screen is bigger, so if you move the chars down to 240 pixels on NTSC they will not shown, but on PAL machines they will. Quote Link to comment Share on other sites More sharing options...
CatPix Posted April 7, 2016 Share Posted April 7, 2016 Oh, I didn't know that. I do'nt program, not enoguh knowledge, but I always try to understand some of the tricks. Very interesting to know that. Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted April 7, 2016 Author Share Posted April 7, 2016 I don't know if this is the problem. Just a guess. Quote Link to comment Share on other sites More sharing options...
CatPix Posted April 8, 2016 Share Posted April 8, 2016 Even if it's not the solution, it's something interesting to know, and a little weird too. So, when you load a game, all the build-in sprites get loaded in memory, and so you have to set them somewhere, even if you don't use any of them? Or does only the ones you call to use in game appears and "stick around"? In any case, it make it an even stranger machine than before, if that was possible Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted April 8, 2016 Author Share Posted April 8, 2016 (edited) You don't really load them to memory, they always exist. What you do is change it's graphics (from existing data on BIOS, you can't personalize) and change it's position on screen. That's why you need to move them out of screen, you can't disable them individually (you can disable all of them at once, but this includes the sprites). Characters should not overlap each other, or it result into visual glitches and the game could crash. Even moving them out of screen, you need to worry about overlapping. Even if you set an "invisible" data (space) the bug happens. The conflict lies on X and Y position, not on what it's displaying. So games like Attack of Time Lord that uses most of characters moving around screen, very close each other and never overlaps, is an impressive feat! The sprites itself (4 available) are other objects, this one you actually load to memory a graphic data and can overlap/collide objects at will. Edited April 8, 2016 by LS_Dracon 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.