Previous Thread
Next Thread
Print Thread
Page 36 of 56 1 2 34 35 36 37 38 55 56
rfka01 #107262 09/14/16 09:01 AM
Joined: Apr 2012
Posts: 193
B
Senior Member
Offline
Senior Member
B
Joined: Apr 2012
Posts: 193
Thanks, Crazyc! I made some progress. Debugging is dead slow, plus i havent mastered palette and IRQ handling yet.

Some questions

How do i set up a second, independent palette for SCREEN 2?

Is there a way to speed up debugging under Visual Studio 2015 (i have quite a beefy laptop with a core I7 and an SSD, but it comes to a crawl with debug builds)...?

I added a macro statement for VSYNC
Code
MCFG_UPD7220_VSYNC_CALLBACK(DEVWRITELINE("upd7220", upd7220_device, ext_sync_w)))
... but don't know where to put the actual IRQ code:

(something like)
Code
if(m_GDC_MODE_REGISTER & GDC_MODE_ENABLE_VSYNC_IRQ)
	raise_8088_irq(IRQ_GRF_INTR_L);

[Linked Image from dl.dropboxusercontent.com]
(WIP: pacman ghosts on the right. No palette, no colors. Still some VRAM bugs)

Last edited by Bavarese; 09/14/16 09:08 AM.
rfka01 #107274 09/14/16 12:27 PM
Joined: Mar 2001
Posts: 17,215
Likes: 234
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,215
Likes: 234
What version are you using that it's still called MESS? smile Any development done on something that old is going to be increasingly hard to port forward.

rfka01 #107275 09/14/16 12:49 PM
Joined: Jan 2012
Posts: 891
Likes: 17
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 891
Likes: 17
If you build with SUBTARGET=mess you'll get a binary with MESS as the window title and the orange icon.

Quote
I added a macro statement for VSYNC
Code:

MCFG_UPD7220_VSYNC_CALLBACK(DEVWRITELINE("upd7220", upd7220_device, ext_sync_w)))


... but don't know where to put the actual IRQ code:

(something like)
Code:

if(m_GDC_MODE_REGISTER & GDC_MODE_ENABLE_VSYNC_IRQ)
raise_8088_irq(IRQ_GRF_INTR_L);

You should create a WRITE_LINE_MEMBER in the driver just like any other line. The example you have there which writes back into the 7220 device is for machines (mostly the 9801) which have multiple 7220s and one drives the sync for the other.

Last edited by crazyc; 09/14/16 12:54 PM.
rfka01 #107276 09/14/16 12:59 PM
Joined: Apr 2012
Posts: 193
B
Senior Member
Offline
Senior Member
B
Joined: Apr 2012
Posts: 193
Ok. As for the palette, there seems to be only 1 palette per machine, is that correct?

I dont see a machine which uses "palette2" or something similar. Is the GFXDECODE thing absolutely required / necessary?

Thanks again in advance.

Last edited by Bavarese; 09/14/16 01:08 PM.
rfka01 #107277 09/14/16 01:28 PM
Joined: May 2004
Posts: 996
Likes: 103
D
Senior Member
Offline
Senior Member
D
Joined: May 2004
Posts: 996
Likes: 103
You can have as many palettes as you want, MCFG_PALETTE_ADD adds one to the machine config.

rfka01 #107278 09/14/16 01:48 PM
Joined: May 2004
Posts: 1,772
Likes: 34
H
Very Senior Member
Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,772
Likes: 34
just be aware that if you have multiple palettes you can't use the indexed screens, you have to use the rgb32 ones instead of ind16

it can get a bit messy.

also there's the core problem with multiple screens you might run into with complex setups, whereby if you have 2 screens running at different refresh rates one of them won't update properly (the partial update system gets very confused because it expects both the screens to end at the same time and if that isn't the case large parts of one screen end up not updating at all)

rfka01 #107316 09/16/16 04:41 PM
Joined: Apr 2012
Posts: 193
B
Senior Member
Offline
Senior Member
B
Joined: Apr 2012
Posts: 193
I now have implemented a stripped down version of the VT240 display code (no DMA scroll mode, no line erase mode...).

The rest turns out to be a lot harder than i thought.

Main problem: macros for VSYNC and PALETTE still appear to be wrong.
. So VSYNC IRQs do not fire and i can't get hold of the second palette.

Could an expert have a look?


P.S.: i added a bootable image, as well as the Pacman freeware for testing purposes. Pacman runs in medium resolution, on color ("pacman") and monochrome displays ("pacmono"). It was chosen because it needs no IRQs and follows well known patterns.

Invocation:
mess64 -window -debug rainbow -frameskip 10 -flop1 c:\msys64\_DISKS\bootbar.img -flop4 c:\msys64\_DISKS\FDSTD_COLOR.img


A newly invented DIP should, in theory, switch between grey shades on monochrome and R G B ("color mode"; the green gun is actually wired to MONO out from the _graphics option_).

Dual monitor support (R G B plus Mono) was added late in the design. Few commercial programs (AutoCad 2.6) support it. A homebrew cable and a patch to avoid the internal switch ('diagnostic_w', m_ONBOARD_GRAPHICS_SELECTED) usually make the difference..

Although not entirely correct, my proposition is to restrict NEC GDC7220 output to the right hand side.

Reference:
https://dl.dropboxusercontent.com/u...on_Programmers_Reference_Guide_Jun84.pdf

Last edited by Bavarese; 09/16/16 05:10 PM.
rfka01 #107317 09/16/16 05:11 PM
Joined: Jan 2012
Posts: 891
Likes: 17
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 891
Likes: 17
The vsync callback line needs to be below the 7220 DEVICE_ADD line.

rfka01 #107319 09/16/16 05:30 PM
Joined: Apr 2012
Posts: 193
B
Senior Member
Offline
Senior Member
B
Joined: Apr 2012
Posts: 193
Thanks so far.

VRAM accesses are still botched, and the keyboard now misbehaves often with ERROR 13.

Will report later. smile


Last edited by Bavarese; 09/16/16 06:03 PM.
rfka01 #107320 09/16/16 06:39 PM
Joined: Jan 2012
Posts: 891
Likes: 17
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 891
Likes: 17
It took a while for me to get the vram writes correct on the vt240. There were many subtle details that needed to be correct. Since the rainbow looks to be very similar but not identical I'd expect there to be some extra wrinkles.

Page 36 of 56 1 2 34 35 36 37 38 55 56

Link Copied to Clipboard
Who's Online Now
2 members (Kale, 1 invisible), 233 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,320
Posts121,923
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com