Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 30, 2011 17:36:20 GMT -5
After spending a good chunk of the afternoon looking over VDP documents, I'm now a little confused/unsure of a few things. darkdust.net/writings/megadrive/initializing#VDP_registersThe person states that you can set the Genesis/Mega Drive into V28 mode, so Pal/Mega Drives will display 320x224 instead of 320x240, and this can be set through register 1 (#$81XX). info.sonicretro.org/SCHG:VDP_Documentation/General/Registerscgfm2.emuviews.com/txt/genvdp.txtThese 2 sites lead me to believe the same, though it could just be poorly written or I'm misunderstanding it. So, by doing this: move.w #$8120,($C00004) I should be forcing PAL systems to display in 320x224 mode, yes? If I compile that, I get a 68K error in Fusion and Regen. If I set everything to 00, and I run in PAL mode, it still shows artifacts on the bottom of the screen. Is this possible to do, or am I misunderstanding the whole thing? Thanks!
|
|
|
Post by jlf65 on May 30, 2011 20:58:53 GMT -5
Yes, setting V28 mode makes both PAL and NTSC 224 tall. It works fine on any PAL system. The problem is the value you are storing is wrong. The MSB of $81 means write register 1, so that's okay, but the LSB of $20 has only bit 5 set, which is NOT okay. Look at the bits for register 1:
You're only turning on the vertical blank interrupt, and NOTHING ELSE! The "typical" value for register 1 is $74, which enables the display (b6), enables the vblank int (b5), enables the DMA (b4), clears M2 (b3) which sets "NTSC" height (V28 mode), sets Genesis video mode (b2), and clears the two lsbs as needed.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 30, 2011 21:51:05 GMT -5
Ok, so I'm definitely lost now. $81 is good, great. The typical value to write - $74, which I understand to be this: 01110100 for the bits So, this should now be: move.w #$8174, ($C00004) Same results - illegal instruction What am I missing? Boy am I starting to not like ASM
|
|
|
Post by jlf65 on May 31, 2011 3:52:21 GMT -5
Have you tried move.w #$8174, $C00004
Parenthesis normally only go around address register indirect modes like (a0) or 4(a0).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 31, 2011 5:21:41 GMT -5
Yep, still the same results.
|
|
|
Post by Mairtrus on May 31, 2011 8:41:37 GMT -5
That's because you are setting the Vertical Interrupt, but you haven't defined a section for it. Simply add a "On VBlank GoSub..." or just clear the bit 5 (it becomes $34).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 31, 2011 9:45:26 GMT -5
Tried move.w #$8134, 4(a4), still the same results.
Any other ideas?
|
|
|
Post by jlf65 on May 31, 2011 15:38:44 GMT -5
We need to see more of the code. With what little you provide, there's no way to tell you where the error is. If you don't want to show the code, you'll be stuck debugging it yourself.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 31, 2011 15:50:45 GMT -5
asm ;move.w #$8174, ($C00004) move.w #$8134, 4(a4) end asm
That's all the code. There wasn't much to really show. I figured posting the 1 line to make this work would be enough. Even that by itself causes the illegal error.
|
|
|
Post by Mairtrus on May 31, 2011 15:53:05 GMT -5
asm ;move.w #$8174, ($C00004) move.w #$8134, 4(a4) end asm My bad. It's $54, not $34.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 31, 2011 15:58:35 GMT -5
Ok, so that works (I did try that), but maybe I'm confused on the way an emulator works. If you set the emulator to Autodetect, it'll detect it as NTSC. If you set it to PAL, it still shows artifacts at the bottom of the screen. Is this because the emulator overrides the VDP resolution and sets it at 320x240?
|
|
|
Post by jlf65 on May 31, 2011 22:36:00 GMT -5
It shouldn't. Maybe it's just the emulator - try another. I use Gens/GS.
|
|
|
Post by Tiido on Jun 1, 2011 4:37:37 GMT -5
BEX automatically sets screen res to 320x240 if in 50Hz
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 1, 2011 6:33:35 GMT -5
So there's really no way around this then in BEX?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 1, 2011 7:41:41 GMT -5
If you want to use 320x224, simply don't do anything. PAL / NTSC doesn't have anything to do with region lock, neither can you select 50 / 60 Hz through software.
|
|