Jump to content

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

Generally when you have this kind of issue  it is because thé vsync nmi occurs while you are accessing the vdp.

Share this post


Link to post
Share on other sites
17 minutes ago, youki said:

Generally when you have this kind of issue  it is because thé vsync nmi occurs while you are accessing the vdp.

Yeah I have had that issue but this is different. Static screen and no NMI going. I have had it happen in the past too I was just hoping someone would be able to say "oh yeah you are doing this wrong...."

Share this post


Link to post
Share on other sites

Could you post a picture of what you sée on screen?

 

Did you try your rom on blueMsx or coolCV emulator? They are more accurate and blueMsx as a built in debugger that Can help.

 

Share this post


Link to post
Share on other sites
1 hour ago, youki said:

Could you post a picture of what you sée on screen?

 

Did you try your rom on blueMsx or coolCV emulator? They are more accurate and blueMsx as a built in debugger that Can help.

 

I sent you some pics in PM - I didn't try the other emulators as I know it is just a register setting that is off not the emulator. I will look at how CP/M sets it up that may help me figure it out, CP?M uses the same graphics mode.

Share this post


Link to post
Share on other sites

It sounds like you may be writing to the VDU too fast. The recommended speed to access the VDP is once every 29 cycles. You can't use the LDIR/OTIR commands since these write at 21 cycles per byte. Trying adding some NOPs between writing bytes to VDU.

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