Jump to content
Sign in to follow this  
LS_Dracon

Kernel 2600 style

Recommended Posts

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...

post-10940-0-33930500-1443567087_thumb.jpg

Edited by LS_Dracon
  • Like 5

Share this post


Link to post
Share on other sites

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 by LS_Dracon

Share this post


Link to post
Share on other sites

You gotta email rene_G7400 and asks if he still have some for sale.

Edited by CatPix

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by LS_Dracon

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :D

Share this post


Link to post
Share on other sites

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 by LS_Dracon

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...