lgblgblgb / xemu

Emulations (running on Linux/Unix/Windows/macOS, utilizing SDL2) of some - mainly - 8 bit machines, including the Commodore LCD, Commodore 65, and the MEGA65 as well.
https://github.com/lgblgblgb/xemu/wiki
GNU General Public License v2.0
201 stars 31 forks source link

MEGA65: Multi color mode problem #205

Closed mteufel closed 3 years ago

mteufel commented 3 years ago

Describe the bug When I am in 64 mode and enter

POKE 53270,PEEK(53270) OR 16

everything is perfekt and I see the result: Switching to multicolor.

When I do the same in 65 Mode, no real change. The color bars on top are changing a bit, but the charset itself does not change, its white. Sometimes as you can see in the screenshot, the whole screen turns white.

Used version of the project I compiled the "hmw" Branch of XEMU, because in this branch the vic 4 work should be integrated

To Reproduce see Description

Expected behavior In 65 I would expect a switch to Multicolor-Mode as in 64 mode. When I do a POKE 53282,7 then I expect that the color changes. In 64 modes this is the case, in 65 mode not.

Screenshots C64 Mode after the poke: image C65 Mode after the poke: image

Computer/Device (please complete the following information):

Additional context

lgblgblgb commented 3 years ago

Thanks for the report!

I'm not sure, but at first glance, it can be some combination of modes, ie MCM mode with extended attribute text mode together. As it's OK with "C64 mode" but not in "C65 mode", I have the suspect that the difference is having enabled extended attribute mode, in "C65 mode" but not in "C64 mode". Though it's just my first impression, which can be bad, easily.

mteufel commented 3 years ago

How can I help to get things clear?

lgblgblgb commented 3 years ago

Don't worry, these comments here (for example my previous one) is more for "in-group" communication and archive-purposes, etc :) It's not meant that you need to do anything too much :) But, if you have time you can try to disable extended attribute mode and enable MCM after that, if it has the same problem then. Surely, it would be the thing I do, as well, However it's worktime here still, so I can do things like this only later!

hernandp commented 3 years ago

I'll take this.

lgblgblgb commented 3 years ago

@hernandp OK, then it's yours, my friend :)

lgblgblgb commented 3 years ago

Note to myself :) I need to check this in the C65 emulator as well ... hmmm ...

hernandp commented 3 years ago

@lgblgblgb can you test on your MEGA65 hardware for reference? I checked both xemu branches and we are rendering the same output with different implementations. Just POKE 53270,PEEK(53270) OR 16 in M65 mode.

lgblgblgb commented 3 years ago

That's funny. Yes, I should have tried this since ages, sorry about that. But the funny thing:

  1. make sure your MEGA65 has monitor connection otherwise it does not produce any image ;)
  2. but more seriously (indeed I forgot to plug-in) now: issuing this causes almost NO visible change at all, BUT a very hard to notice pixel difference ONLY at the end of the colour stripes, where their ends have that 45 degree angle, and some colour change on the bars only.

So I assume this may not work on MEGA65 either. Surely, we can't test on a real C65 ...

Screenshots on actual MEGA65:

Before:

before

After:

after

hernandp commented 3 years ago

@lgblgblgb Thank you very much my friend. So can we assume both emulators (standard and hwt branches) are OK it seems.

lgblgblgb commented 3 years ago

Yes, maybe, but it can be a coincidence only, and bug in MEGA65, we may need to signal that really it should be the way it works ... (I mean on MEGA65 as well!!!)

hernandp commented 3 years ago

I agree, thank you!

gardners commented 3 years ago

You have to set the BANK in C65 mode, before the poke will work, perhaps? VIC-III Extended attribute mode + MCM is supposed to work properly, I think. Would be good to know behaviour on a real C65. Ask Carlos to test it, perhaps?

mteufel commented 3 years ago

Do you mean BANK 128 ?

lgblgblgb commented 3 years ago

Argh this BANK madness of C65 drives me crazy, it should die!!!!!! Grrr. ;)

lgblgblgb commented 3 years ago

OK, guys, what's the situation with this bug? Is it really a bug, or "just" the case of the "wonders" of the POKE in C65 mode and the BANK madness ;)

mteufel commented 3 years ago

I would suggest to close it, even if I not really know at the moment why I doesn’t work. Actually I am working on a Pixler (Hires and Multicolor) and I will definately come back to this when I want to show the pixelled pictures in 64 and 65 mode. So if I don’t get it to work I come back to you and then – if necessary – we can re-open this one.

gardners commented 3 years ago

So, it's not a bug but correct behaviour: Remember MCM only applies to characters that use colour 8 through 15 -- thus the light blue of C64 mode triggers all the chars to go MCM, but the white (colour $01) of C65 basic mode doesn't. But if you change the cursor colour in C65 mode to light blue or any other colour from $08 to $0F, you will see the MCM mode activated for those characters.

So this confirms that it isn't a bug, just one of the strange subtleties of MCM mode working correctly.

lgblgblgb commented 3 years ago

OK, so I missed the point it seems :-O right then, closing the issue, thanks. Honestly I was not so much aware of MCM behaviour in case of text modes, it seems :-O