New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Extended 80-Column Text/AppleColor Card's DHGR Mixed Mode #523

Open
tomcw opened this Issue Dec 22, 2017 · 51 comments

Comments

Projects
None yet
6 participants
@tomcw
Copy link
Contributor

tomcw commented Dec 22, 2017

Spun off from #308, where @burniouf said:

It could be a very cool AppleWin implements DHGR Mixed Mode!

if bit 7=1 -> color
if bit 7= 0 -> mono
See Chapter 6 in:
ftp://ftp.apple.asimov.net/pub/apple_II/documentation/hardware/video/Ext80ColumnAppleColorCard.pdf
And:
https://patentimages.storage.googleapis.com/pdfs/US4631692.pdf
already implemented in JACE.
the A2osX DHGR.DRV already implement this "MIXED" mode for BitBLT, RECT....etc....LINE functions..

See Ext80ColumnAppleColorCard.pdf's page 58-59 on how to select the 3 modes (special combinations of AN3 and 80COL soft-switches):

  • Mode 1: Monochrome 560 x 192
  • Mode 2: Color 140 x 192
  • Mode 3: Mixed Mode

See US4631692.pdf page 6 for details about "The Mixed Mode".

@burniouf

This comment has been minimized.

Copy link

burniouf commented Dec 22, 2017

Please note that these 3 modes (and also the 4th one 160x192 ???) are also implemented in another 80Col/128k called "Le Chat Mauve/EVE"
btw, i have not this board to test on real hardware, but i fear the sequence of Soft switches is a bit different.

Antother point:
These 3 modes output ONLY to a RVB monitor connected to these 2 boards, the regular coaxial PAL/NTSC output is not affected.

so it should be ok if these modes were activated only when selecting a new "Color RVB Monitor" in Applewin configuration, leaving "Color Monitor" behaving like coax connected (without mode 3)

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Dec 22, 2017

Thanks.
NB. I'm not making any commitment to supporting this, but just raising it since you expressed interested in it.
btw. do you have any Apple II software that exploits this DHGR Mixed Mode (mode 3)?

@burniouf

This comment has been minimized.

Copy link

burniouf commented Dec 22, 2017

image

@burniouf

This comment has been minimized.

Copy link

burniouf commented Dec 22, 2017

image

@burniouf

This comment has been minimized.

Copy link

burniouf commented Dec 22, 2017

note the slight difference:
the Apple is a color bitmap with bit 7 set
Marylin is a b/w bitmap with bit 7 cleared

OK in JACE
KO in AppleWin

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Dec 22, 2017

Thanks for sharing those screenshots.
Is there a .dsk image that demonstrates this behaviour?

@burniouf

This comment has been minimized.

Copy link

burniouf commented Dec 22, 2017

i'm currently rebuilding the whole A2osX media with BATCH files to launch several preconfigured settings to test eighter DHGR or SSC (IRQ) or whatever......
but got a problem, added too much stuff to the kernel and S-C MASM 2.0 is getting out of memory to build it!!!! hahaha....

Now switching to MASM 3.0.....this may take a while.... :-(

will commit to https://github.com/burniouf/A2osX once ready....

@burniouf

This comment has been minimized.

Copy link

burniouf commented Dec 22, 2017

Done.

Boot A2osX.BUILD mounted as S7,D1
you will get into S-C MASM
type:
-run
you are in A2osX

i made 2 scripts:
GUI that will get you to Marylin
SSC that will setup SSC driver with IRQ, just Telnet to 127.0.0.1:1977 and you will connect to the A2osX server

let me know if ok

@burniouf

This comment has been minimized.

Copy link

burniouf commented Dec 22, 2017

oh.....and NO login/password required...just ENTER

@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

sicklittlemonkey commented Dec 23, 2017

@burniouf

This comment has been minimized.

Copy link

burniouf commented Dec 23, 2017

Hi Nick,

Thanx for this usefull link.

Would you mind testing this A2osX demo disk on your RGB card attached to a RGB monitor ?
Or are you interested in trading this card ?

remy

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Aug 8, 2018

@inexorabletash commented in #575:
The Extended 80 Column / AppleColor RGB card as well as Video 7 and Le Chat Mauve support a handful of additional graphics modes. The AppleColor RGB ones are the common subset of most interest:

Mode 1: Mono 560x192 (i.e. DHR in mono mode)
Mode 2: Color 140x192 (i.e. normal DHR)
Mode 3: Mixed (high bit forces mono on a byte by byte basis)

These are accessed by hitting AN3 in the right sequence with 80COL, per the manual ftp://ftp.apple.asimov.net/pub/apple_II/documentation/hardware/video/Ext80ColumnAppleColorCard.pdf

Mode 3 is technically interesting but poorly documented - we lack good reference images to know exactly how things should appear on the boundary.

Mode 1 is useful for apps that use DHR in monochrome, like Apple II DeskTop / MouseDesk, which initializes the mode, freeing the user from hitting that pesky mono/color toggle. This is the one I'm most interested in emulators supporting.

Given the number of video add-ons that support this capability, and that it was implemented by a specific handshake unlikely to be triggered by existing code, it seems like it would be reasonable to add to AppleWin in isolation w/o claiming full support for emulation of any particular card. I'd be satisfied by Mode 1/2 only.

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Aug 8, 2018

@sicklittlemonkey commented in #575:

I'm in favour of supporting all 3 modes.

Here's the list of software I posted to c.s.a2 that hits AN3 multiple times. (The ones that don't might still use the DHR high bit though - I haven't checked that.)

Beagle Graphics yes.
Dazzle Draw yes.
King's Quest (4am and san inc crack) yes.

Translyvania DHR yes/maybe.

Test Drive no.
Aliens no.

Cheers,
Nick.

@burniouf

This comment has been minimized.

Copy link

burniouf commented Aug 9, 2018

i vote for supporting mixed mode and all 3 modes.
Applewin is my main "developement tool" for A2osX, and i based GUI on mixed mode.
So it will be great to have Mode3 displayed properly so i can resume GUI writing.... :-)

@JonathanGrahamPi

This comment has been minimized.

Copy link

JonathanGrahamPi commented Dec 4, 2018

I definitely vote for supporting this. I also have some original hardware I can use for testing. I have the Apple //c Video7 Screen Enhancer. Which provides these three modes on either a monochrome monitor (by replacing the colour pixels was true shades of grey) and on composite NTSC video.

@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

sicklittlemonkey commented Jan 21, 2019

@tomcw Presumably this is more feasible now that we have an RGB mode.

@burniouf

This comment has been minimized.

Copy link

burniouf commented Jan 22, 2019

Great!
Let me know if i can help in any way...

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Jan 23, 2019

Hi Nick, my initial thought was "not really more feasible" - as the AppleWin rendering (both RGB & NTSC) operates on 14 DHGR pixels at a time (and I assume this mixed mode works at a byte or 7-pixel granularity).

But the RGB mode renders in 2x 7-bit parts, so that's easy to split. And the mono part is done pixel by pixel, so that's also easy to split.

So yes, it should be more feasible now.

@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

sicklittlemonkey commented Jan 24, 2019

Great! Yes, I thought so.

Some more references, mainly from this thread where I was digging for more info for the VidHD - which might or might not support this.
https://groups.google.com/d/topic/comp.sys.apple2/QzlPKoV9nzg/discussion

Lots of info about Le Chat Mauve that Google translates very well:
http://boutillon.free.fr/Underground/Anim_Et_Graph/Extasie_Chat_Mauve_Reloaded/Extasie_Chat_Mauve_Reloaded.html

This piece is key: (Search for quadruplet which I've replaced with quad for formatting here):
A quad is either one of 16 colors (1 pixel 4 times wider than high) or 4 bits represented on the screen in B&W. The display mode of the quad (color or B&W) depends on the location of bit 0 of the quad.
If bit 7 byte = 0 (B&W mode) and bit 0 of the quad is in the byte then the quad display is in B&W.
If bit 7 byte = 1 (color mode) and bit 0 of the quad is in the byte then the quad display is in color.
It is therefore bit 7 of the byte in which the bit 0 of the quad determines the color of the latter.

And this Video 7 manual (Apple simply rebranded their card) is the definitive reference I think:
http://apple2online.com/web_documents/Video-7%20Manual%20KB.pdf

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Jan 25, 2019

@burniouf - I tried to follow your instructions (above from 2017) with A2OSX.BUILD.po (link). I see that this was only updated 5 hours ago, so probably work in progress?

Anyway, when I type GUI, then I get the following 'Out Of Memory' error:

/A2OSX.BUILD/ROOT/$ GUI                                                         
Starting GUI...                                                                 
INSDRV:Loading MOUSE.DRV...                                                     
Apple Mouse Driver.                                                             
No Mouse Found.                                                                 
INSDRV MOUSE.DRV                                                                
-----------------^                                                              
Line #3:[$28]:No Device.                                                        
INSDRV:Loading DHGR.DRV...                                                      
Apple IIe/IIc DHGR Driver.                                                      
No Specific H/W Found, Assuming 80c Mode.                                       
INSDRV DHGR.DRV                                                                 
----------------^                                                               
Line #4:[$FF]:Out Of Memory.                                                    
PID=19                                                                          
/A2OSX.BUILD/ROOT/$                                                             

Is there something I'm missing?

@burniouf

This comment has been minimized.

Copy link

burniouf commented Jan 25, 2019

hahaha....yes....

Instructions you followed dated to version 0.91.....one year ago !
For now, we are wroking on 0.92+....more network ralated.

I'm trying to find you a .PO image where you could type this GUI command...
will post you a link here.

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Jan 25, 2019

Thanks - the GUI command is working now.

btw. have you tested your code for turning on DHGR mixed-mode on real RGB card hardware?

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Jan 25, 2019

EG. In the Video 7 manual, it's a precondition that 80STORE is set (eg. a write to $C001), but from your code I see you turning it off with a write to $C000 just before doing the 80COL and AN3 toggling to set DHGR mixed-mode.

@burniouf

This comment has been minimized.

Copy link

burniouf commented Jan 26, 2019

no, i'm desesperately seeking these boards everywhere at an affordable price, but no luck ... :-(
if someone could help about this (providing hardware or testing), i would be very happy!!!

@burniouf

This comment has been minimized.

Copy link

burniouf commented Jan 26, 2019

i particularly wanted to test the 4th mode (640x192) to see if useable on regular monitors

@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

sicklittlemonkey commented Jan 31, 2019

tomcw added a commit that referenced this issue Feb 2, 2019

Support for AppleColor / Video7 DHGR mixed mode (#523) (PR #620)
Supported modes selected via toggling AN3 and clocking in 80COL:
- 140 color mode (Apple calls this mode 2, Video7 calls this mode 0).
- mixed mode (Apple calls this mode 3, Video7 calls this mode 2).
- 560 mono mode (Apple calls this mode 1, Video7 calls this mode 3).

Save-state is also persists the extra state.

And there's a few corrections to APPLE2E.SYM for the 80STORE and 80COL I/O addresses.

@tomcw tomcw added this to the 1.28.1 milestone Feb 2, 2019

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Feb 2, 2019

There's a new built (AppleWin 1.28.1) here, which supports Mixed mode and 560-mono mode (and 140-color mode, but this is just regular DHGR).

You need to set the video mode to "Color (RGB Monitor)" to see the new supported modes.

Tested with:

  • Dazzle Draw
  • King's Quest 1
  • Beagle Graphics
  • Le Chat Mauve (eg. the motorcycle uses 560-mono mode)
  • A2OSX (GUI test)
  • Apple Ext80ColumnAppleColorCardHR Demo 1/2 disks
    • NB. SEASCAPE and LAKESHORE appear to be using 160-color mode

Give it a try and let me know how you get on.

@burniouf

This comment has been minimized.

Copy link

burniouf commented Feb 2, 2019

image

@burniouf

This comment has been minimized.

Copy link

burniouf commented Feb 2, 2019

Not bad! :-)

@burniouf

This comment has been minimized.

Copy link

burniouf commented Feb 2, 2019

image

@burniouf

This comment has been minimized.

Copy link

burniouf commented Feb 2, 2019

note the mouse pointer (which is a BM bitmap) uncoloring blue background....normal behaviour.
i did just a quick test, but seems to be working as documented in "Apple 80 Color" card's manual.
Thanx a lot !

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Feb 2, 2019

re. mouse pointer
Yes, this is expected... but take a look how Dazzle Draw solves this (eg. Mono images aligned to byte boundaries, pointer is drawn half mono & half colour - depending on the overlap with the background image).

@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

sicklittlemonkey commented Feb 2, 2019

@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

sicklittlemonkey commented Feb 2, 2019

Remy, to be clear, when I said "AND #$80 then ORA pointer_data" what I meant was:

LDA screen
AND pointer_mask ; pointer_mask has $80 set
ORA pointer_data ; pointer_data has $80 clear
STA screen

Cheers,
Nick.

@inexorabletash

This comment has been minimized.

Copy link

inexorabletash commented Feb 3, 2019

FYI, problem in linked issue was on my end. Works gloriously, thanks @tomcw and everyone else who chipped in.

Video up on the FB.

@burniouf

This comment has been minimized.

Copy link

burniouf commented Feb 3, 2019

To solve the Pointer problem in A2osX 's DHGR.DRV, it is a bit less trivial.
When you invoke BitBlt command to paint a bitmap you specify some operation like AND/ORA/SET....it allows also some SAVE restore operation (see : https://github.com/burniouf/A2osX/blob/master/INC/GFX.I.txt for API 'COMMAND BLOCK' definition)

So the DHGR.DRV should:

S.CB.OP.SET : set the SCREEN color bit according to source bitmap type (to allow BW windows on top of color desktop)

S.CB.OP.ORA : ora the SCREEN color bit with source bitmap type.

btw, to solve this particular Pointer problem, the most trivial way is to set the bitmap type from MONO to COLOR in all pointer images.

@H82lose

This comment has been minimized.

Copy link

H82lose commented Feb 3, 2019

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Feb 3, 2019

Nick:

It's amazing to see Dazzle Draw in a way new to me, but for which it was coded for all that time ago!

Yes, I know. The developer & publisher really raised the bar here in terms of quality, especially supporting so many hardware add-ons (this RGB Mixed mode, mouse, Koalapad, graphics tablet, joystick, 8x printers etc).

Just for this mixed mode alone, the development & testing must have fairly added to things, given that you can't probe for the RGB Mixed mode support, so it had to work passively under both RGB and composite.

Patrick: re. Woz: nothing yet, but keep pestering!

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Feb 3, 2019

@inexorabletash - can you include a link to A2D that uses the 560-mono mode?

@inexorabletash

This comment has been minimized.

Copy link

inexorabletash commented Feb 3, 2019

@tomcw - snag one from https://github.com/inexorabletash/a2d/releases - the releases are a mess as it has morphed from just add-ons to a rebuild. No ProDOS on the "1.2 Pre Alpha 0" image itself, but otherwise works, apart from filename cases for desk accessories. (CADIUS "helpfully" includes GS/OS case bits, which the new A2D respects if present...)

If you have image files with file type $08 (FOT) they get a shiny new icon and you can just double-click them. If they're just BIN (etc) you can copy PREVIEW/SHOW.IMAGE.FILE into DESK.ACC/ and (after restarting) it'll appear in the Apple menu and can be invoked manually after selecting an image file.

EDIT: I should note: image preview support assumes HR 8k files, DHR (aux first) for 16k files. HR is converted to DHR on the fly rather than switching modes, so it makes for a good test case.

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Feb 3, 2019

@inexorabletash - I tried the 800K A2DeskTop.po image under AppleWin (model=Enhanced //e), but it just immediately reports:

UNABLE TO LOAD PRODOS

Is this for IIGS only?

@inexorabletash

This comment has been minimized.

Copy link

inexorabletash commented Feb 3, 2019

The disk just doesn't have the PRODOS system file on it. Noted above, just poorly worded. Copy it or boot from another disk, then launch DESKTOP.SYSTEM

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Feb 4, 2019

Ah yes, you did say that! OK, that's loading now.

I do have a disk with an FOT file (and I can see the new icon), but when I double click it I just get a dialog box saying "Please insert the system disk."

@inexorabletash

This comment has been minimized.

Copy link

inexorabletash commented Feb 4, 2019

I just get a dialog box saying "Please insert the system disk."

Was the A2D volume still accessible? That alert would show if it's not. A2D is trying to load PREVIEW/SHOW.IMAGE.FILE relative to A2D to actually do the preview - overlays and accessories are loaded on the fly. A2D basically needs the volume to remain mounted for smooth operation.

@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

sicklittlemonkey commented Feb 4, 2019

@sicklittlemonkey

This comment has been minimized.

Copy link
Contributor

sicklittlemonkey commented Feb 4, 2019

@inexorabletash

This comment has been minimized.

Copy link

inexorabletash commented Feb 4, 2019

@sicklittlemonkey - follow up on the a2d repo to keep this on topic? (quick answers: (a) not trying to make the image stand-alone, it's just a distribution mechanism for installing the app onto your existing mass storage device... which is indicative of different workflows people have and expect; I think there's an analysis waiting to be written there... (b) issues/PRs welcome!)

@tomcw

This comment has been minimized.

Copy link
Contributor Author

tomcw commented Feb 4, 2019

Hi Joshua,

Was the A2D volume still accessible? That alert would show if it's not.

Spun off here... inexorabletash/a2d#125
Resolved by using a newer version of ProDOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment