Jump to content
Milli Vee

Graphics Mode II

Recommended Posts

Hi - I am doing some coding using Graphics Mode || and on in AdamEm under the emulator it works great but when I move it to real hardware the screen is garbled.

My register settings are:

 

V.PATTERNNAME  .equ    07h                                      ; Register 2
PATTERNNAME    .equ    01C00h                                   ; Uses 0300h bytes

V.COLORTABLE   .equ    080h                                     ; Register 3
COLORTABLE     .equ    02000h                                   ; Uses 1800h bytes

V.PATTERNGEN   .equ    00h                                      ; Register 4
PATTERNGEN     .equ    00000h                                   ; Uses 1800h bytes

V.SPRITEATTR   .equ    030h                                     ; Register 5
SPRITEATTR     .equ    01800h                                   ; Uses 80h bytes

V.SPRITEDATA   .equ    07h                                      ; Register 6
SPRITEDATA     .equ    03800h                                   ; Uses 400h bytes

And I am sending 02h to Register 0 to set Mode 3 (GR Mode II) and sending the value for BLACK to register 7 for the background. My register 1 setup is:

 

16K, VDP Active, 16 byte sprites and X2 mag: which is 0C3H (11000011b)

 

I know there is a something else that needs to be done to get it to work on the real hardware but I am not sure which. It almost seems like my settings for the PATTERNGEN and COLORTABLE are wrong when it comes to real hardware. The PATTERNAME, SPRITEDATA and SPRITEATTR all work on the real hardware - just garbled text and colors

 

Share this post


Link to post
Share on other sites
Posted (edited)
4 minutes ago, Pixelboy said:

This topic belongs in the "ColecoVision Programming" sub-forum.

 

I thought so also but it involves the AdamEM so I thought someone using the AdamEM would have a clue. If someone can move it that would be great. I can't delete it so I don't want to double post.

Edited by Milli Vee
More content

Share this post


Link to post
Share on other sites

How are you updating the VDP registers exactly? I'm guessing the problem might be you're writing to the hardware registers too fast (timing issues usually don't show up on emulators). Make sure you do it during the VBL and you should be fine. 

Share this post


Link to post
Share on other sites
3 hours ago, Jorge PM said:

How are you updating the VDP registers exactly? I'm guessing the problem might be you're writing to the hardware registers too fast (timing issues usually don't show up on emulators). Make sure you do it during the VBL and you should be fine. 

Hi no it is this particular mode. I use the exact same code for other games including CCR and Doom CV. I’m going to disassemble the cpm code for this mode tomorrow - they solved the issue :) 

Share this post


Link to post
Share on other sites

Plenty of people can access graphics 2 without corruption... but without seeing your code people are only guessing. Telling people their guess is wrong doesn't help anyone narrow it down. ;)

 

It's not likely related to speed of register writes, it's most likely related to speed of RAM access, as was noted in the other thread. Graphics II with sprites has the fewest number of CPU access slots. You MUST delay between setting the address and reading data, and you must delay between each byte read or written. You can get away with being on the edge for a long time, but it only takes one miss to screw up your whole image.

 

A fast way to test if it's RAM access timing is to set the blanking bit - that allows the CPU to use all possible access slots and you can access RAM without delay. If you blank the screen, set it up, then unblank it - and it's perfect - then it's your RAM access timing.

 

 

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...