Merge pull request #1 from techav-homebrew/XGA

Xga
This commit is contained in:
techav 2021-10-22 22:24:59 -05:00 committed by GitHub
commit 42f59513e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 92702 additions and 56448 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -13,186 +13,10 @@ G01*
D10*
X0Y0D02*
X1016000Y0D01*
X1016000Y406400D01*
X0Y406400D01*
X965200Y0D01*
X965200Y101600D01*
X876300Y101600D01*
X876300Y685800D01*
X0Y685800D01*
X0Y0D01*
X952001Y13970D02*
X951006Y14041D01*
X950018Y14183D01*
X949043Y14395D01*
X948085Y14676D01*
X947151Y15025D01*
X946243Y15440D01*
X945367Y15918D01*
X944528Y16457D01*
X943729Y17055D01*
X942975Y17709D01*
X942269Y18415D01*
X941615Y19169D01*
X941017Y19968D01*
X940478Y20807D01*
X940000Y21683D01*
X939585Y22591D01*
X939236Y23525D01*
X938955Y24483D01*
X938743Y25458D01*
X938601Y26446D01*
X938530Y27441D01*
X938530Y28439D01*
X938601Y29434D01*
X938743Y30422D01*
X938955Y31397D01*
X939236Y32355D01*
X939585Y33290D01*
X940000Y34197D01*
X940478Y35073D01*
X941017Y35913D01*
X941615Y36711D01*
X942269Y37465D01*
X942975Y38171D01*
X943729Y38825D01*
X944528Y39423D01*
X945367Y39962D01*
X946243Y40440D01*
X947151Y40855D01*
X948085Y41204D01*
X949043Y41485D01*
X950018Y41697D01*
X951006Y41839D01*
X952001Y41910D01*
X952999Y41910D01*
X953994Y41839D01*
X954982Y41697D01*
X955957Y41485D01*
X956915Y41204D01*
X957850Y40855D01*
X958757Y40440D01*
X959633Y39962D01*
X960473Y39423D01*
X961271Y38825D01*
X962025Y38171D01*
X962731Y37465D01*
X963385Y36711D01*
X963983Y35913D01*
X964522Y35073D01*
X965000Y34197D01*
X965415Y33290D01*
X965764Y32355D01*
X966045Y31397D01*
X966257Y30422D01*
X966399Y29434D01*
X966470Y28439D01*
X966470Y27441D01*
X966399Y26446D01*
X966257Y25458D01*
X966045Y24483D01*
X965764Y23525D01*
X965415Y22591D01*
X965000Y21683D01*
X964522Y20807D01*
X963983Y19968D01*
X963385Y19169D01*
X962731Y18415D01*
X962025Y17709D01*
X961271Y17055D01*
X960473Y16457D01*
X959633Y15918D01*
X958757Y15440D01*
X957850Y15025D01*
X956915Y14676D01*
X955957Y14395D01*
X954982Y14183D01*
X953994Y14041D01*
X952999Y13970D01*
X952001Y13970D01*
X63001Y13970D02*
X62006Y14041D01*
X61018Y14183D01*
X60043Y14395D01*
X59085Y14676D01*
X58151Y15025D01*
X57243Y15440D01*
X56367Y15918D01*
X55528Y16457D01*
X54729Y17055D01*
X53975Y17709D01*
X53269Y18415D01*
X52615Y19169D01*
X52017Y19968D01*
X51478Y20807D01*
X51000Y21683D01*
X50585Y22591D01*
X50236Y23525D01*
X49955Y24483D01*
X49743Y25458D01*
X49601Y26446D01*
X49530Y27441D01*
X49530Y28439D01*
X49601Y29434D01*
X49743Y30422D01*
X49955Y31397D01*
X50236Y32355D01*
X50585Y33290D01*
X51000Y34197D01*
X51478Y35073D01*
X52017Y35913D01*
X52615Y36711D01*
X53269Y37465D01*
X53975Y38171D01*
X54729Y38825D01*
X55528Y39423D01*
X56367Y39962D01*
X57243Y40440D01*
X58151Y40855D01*
X59085Y41204D01*
X60043Y41485D01*
X61018Y41697D01*
X62006Y41839D01*
X63001Y41910D01*
X63999Y41910D01*
X64994Y41839D01*
X65982Y41697D01*
X66957Y41485D01*
X67915Y41204D01*
X68850Y40855D01*
X69757Y40440D01*
X70633Y39962D01*
X71473Y39423D01*
X72271Y38825D01*
X73025Y38171D01*
X73731Y37465D01*
X74385Y36711D01*
X74983Y35913D01*
X75522Y35073D01*
X76000Y34197D01*
X76415Y33290D01*
X76764Y32355D01*
X77045Y31397D01*
X77257Y30422D01*
X77399Y29434D01*
X77470Y28439D01*
X77470Y27441D01*
X77399Y26446D01*
X77257Y25458D01*
X77045Y24483D01*
X76764Y23525D01*
X76415Y22591D01*
X76000Y21683D01*
X75522Y20807D01*
X74983Y19968D01*
X74385Y19169D01*
X73731Y18415D01*
X73025Y17709D01*
X72271Y17055D01*
X71473Y16457D01*
X70633Y15918D01*
X69757Y15440D01*
X68850Y15025D01*
X67915Y14676D01*
X66957Y14395D01*
X65982Y14183D01*
X64994Y14041D01*
X63999Y13970D01*
X63001Y13970D01*
M02*

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,314 +9,292 @@ G75*
5,1,8,0,0,1.08239X$1,22.5*%
G01*
%ADD10C,1.422400*%
%ADD11C,5.181600*%
%ADD12P,1.649562X8X292.500000*%
%ADD13C,2.895600*%
%ADD14C,1.422400*%
%ADD15P,1.539592X8X22.500000*%
%ADD16P,1.649562X8X112.500000*%
%ADD17P,1.539592X8X292.500000*%
%ADD18P,1.539592X8X202.500000*%
%ADD19P,1.759533X8X292.500000*%
%ADD11C,1.524000*%
%ADD12C,1.625600*%
%ADD13C,1.009600*%
%ADD14R,1.701800X1.270000*%
%ADD15C,1.609600*%
D10*
X622300Y272796D02*
X622300Y286004D01*
X647700Y286004D02*
X647700Y272796D01*
X774700Y272796D02*
X774700Y286004D01*
X800100Y286004D02*
X800100Y272796D01*
X673100Y272796D02*
X673100Y286004D01*
X698500Y286004D02*
X698500Y272796D01*
X749300Y272796D02*
X749300Y286004D01*
X723900Y286004D02*
X723900Y272796D01*
X825500Y272796D02*
X825500Y286004D01*
X850900Y286004D02*
X850900Y272796D01*
X876300Y272796D02*
X876300Y286004D01*
X901700Y286004D02*
X901700Y272796D01*
X927100Y272796D02*
X927100Y286004D01*
X952500Y286004D02*
X952500Y272796D01*
X952500Y348996D02*
X952500Y362204D01*
X927100Y362204D02*
X927100Y348996D01*
X901700Y348996D02*
X901700Y362204D01*
X876300Y362204D02*
X876300Y348996D01*
X850900Y348996D02*
X850900Y362204D01*
X825500Y362204D02*
X825500Y348996D01*
X800100Y348996D02*
X800100Y362204D01*
X774700Y362204D02*
X774700Y348996D01*
X749300Y348996D02*
X749300Y362204D01*
X723900Y362204D02*
X723900Y348996D01*
X698500Y348996D02*
X698500Y362204D01*
X673100Y362204D02*
X673100Y348996D01*
X647700Y348996D02*
X647700Y362204D01*
X622300Y362204D02*
X622300Y348996D01*
X127000Y622300D03*
X127000Y546100D03*
X101600Y622300D03*
X101600Y546100D03*
D11*
X952500Y27940D03*
X165100Y457200D03*
X190500Y457200D03*
X165100Y431800D03*
X190500Y431800D03*
X165100Y406400D03*
X190500Y406400D03*
D10*
X292100Y457200D03*
X215900Y457200D03*
X292100Y431800D03*
X215900Y431800D03*
X292100Y406400D03*
X215900Y406400D03*
X619760Y457200D03*
X599440Y457200D03*
X327660Y558800D03*
X307340Y558800D03*
D12*
X901700Y53340D03*
X876300Y53340D03*
X850900Y53340D03*
X825500Y53340D03*
X800100Y53340D03*
X774700Y53340D03*
X749300Y53340D03*
X723900Y53340D03*
X698500Y53340D03*
X673100Y53340D03*
X647700Y53340D03*
X622300Y53340D03*
X596900Y53340D03*
X571500Y53340D03*
X546100Y53340D03*
X520700Y53340D03*
X495300Y53340D03*
X469900Y53340D03*
X444500Y53340D03*
X419100Y53340D03*
X393700Y53340D03*
X368300Y53340D03*
X342900Y53340D03*
X317500Y53340D03*
X292100Y53340D03*
X266700Y53340D03*
X241300Y53340D03*
X215900Y53340D03*
X190500Y53340D03*
X165100Y53340D03*
X139700Y53340D03*
X114300Y53340D03*
X901700Y104140D03*
X876300Y104140D03*
X850900Y104140D03*
X825500Y104140D03*
X800100Y104140D03*
X774700Y104140D03*
X749300Y104140D03*
X723900Y104140D03*
X698500Y104140D03*
X673100Y104140D03*
X647700Y104140D03*
X622300Y104140D03*
X596900Y104140D03*
X571500Y104140D03*
X546100Y104140D03*
X520700Y104140D03*
X495300Y104140D03*
X469900Y104140D03*
X444500Y104140D03*
X419100Y104140D03*
X393700Y104140D03*
X368300Y104140D03*
X342900Y104140D03*
X317500Y104140D03*
X292100Y104140D03*
X266700Y104140D03*
X241300Y104140D03*
X215900Y104140D03*
X190500Y104140D03*
X165100Y104140D03*
X139700Y104140D03*
X114300Y104140D03*
D11*
X63500Y27940D03*
D12*
X901700Y78740D03*
X876300Y78740D03*
X850900Y78740D03*
X825500Y78740D03*
X800100Y78740D03*
X774700Y78740D03*
X749300Y78740D03*
X723900Y78740D03*
X698500Y78740D03*
X673100Y78740D03*
X647700Y78740D03*
X622300Y78740D03*
X596900Y78740D03*
X571500Y78740D03*
X546100Y78740D03*
X520700Y78740D03*
X495300Y78740D03*
X469900Y78740D03*
X444500Y78740D03*
X419100Y78740D03*
X393700Y78740D03*
X368300Y78740D03*
X342900Y78740D03*
X317500Y78740D03*
X292100Y78740D03*
X266700Y78740D03*
X241300Y78740D03*
X215900Y78740D03*
X190500Y78740D03*
X165100Y78740D03*
X139700Y78740D03*
X114300Y78740D03*
D13*
X952500Y27940D03*
X63500Y27940D03*
D14*
X152400Y355600D03*
X152400Y279400D03*
X228600Y279400D03*
X228600Y355600D03*
D15*
X50800Y165100D03*
X101600Y165100D03*
X50800Y190500D03*
X101600Y190500D03*
X50800Y215900D03*
X101600Y215900D03*
X50800Y241300D03*
X393700Y661670D03*
X393700Y636270D03*
X368300Y661670D03*
X368300Y636270D03*
X342900Y661670D03*
X342900Y636270D03*
X317500Y661670D03*
X317500Y636270D03*
X292100Y661670D03*
X292100Y636270D03*
X63500Y520700D03*
X38100Y520700D03*
X63500Y546100D03*
X38100Y546100D03*
X63500Y571500D03*
X38100Y571500D03*
X63500Y596900D03*
X38100Y596900D03*
X63500Y622300D03*
X38100Y622300D03*
D10*
X863600Y241300D03*
X838200Y241300D03*
X812800Y241300D03*
X787400Y241300D03*
X762000Y241300D03*
X736600Y241300D03*
X711200Y241300D03*
X685800Y241300D03*
X660400Y241300D03*
X635000Y241300D03*
X609600Y241300D03*
X584200Y241300D03*
X558800Y241300D03*
X533400Y241300D03*
X508000Y241300D03*
X482600Y241300D03*
X457200Y241300D03*
X431800Y241300D03*
X406400Y241300D03*
X76200Y241300D03*
X76200Y12700D03*
X406400Y12700D03*
X431800Y12700D03*
X457200Y12700D03*
X482600Y12700D03*
X508000Y12700D03*
X533400Y12700D03*
X558800Y12700D03*
X584200Y12700D03*
X609600Y12700D03*
X635000Y12700D03*
X660400Y12700D03*
X685800Y12700D03*
X711200Y12700D03*
X736600Y12700D03*
X762000Y12700D03*
X787400Y12700D03*
X812800Y12700D03*
X838200Y12700D03*
X863600Y12700D03*
X381000Y241300D03*
X355600Y241300D03*
X330200Y241300D03*
X304800Y241300D03*
X279400Y241300D03*
X254000Y241300D03*
X228600Y241300D03*
X203200Y241300D03*
X177800Y241300D03*
X152400Y241300D03*
X127000Y241300D03*
X101600Y241300D03*
X50800Y266700D03*
X101600Y266700D03*
X50800Y292100D03*
X101600Y292100D03*
X381000Y12700D03*
X355600Y12700D03*
X330200Y12700D03*
X304800Y12700D03*
X279400Y12700D03*
X254000Y12700D03*
X228600Y12700D03*
X203200Y12700D03*
X177800Y12700D03*
X152400Y12700D03*
X127000Y12700D03*
X101600Y12700D03*
D13*
X198120Y571500D03*
X198120Y546100D03*
D14*
X271780Y543560D03*
X271780Y558800D03*
X271780Y574040D03*
X236220Y574040D03*
X236220Y558800D03*
X236220Y543560D03*
D10*
X622300Y159004D02*
X622300Y145796D01*
X647700Y145796D02*
X647700Y159004D01*
X774700Y159004D02*
X774700Y145796D01*
X800100Y145796D02*
X800100Y159004D01*
X673100Y159004D02*
X673100Y145796D01*
X698500Y145796D02*
X698500Y159004D01*
X749300Y159004D02*
X749300Y145796D01*
X723900Y145796D02*
X723900Y159004D01*
X825500Y159004D02*
X825500Y145796D01*
X850900Y145796D02*
X850900Y159004D01*
X876300Y159004D02*
X876300Y145796D01*
X901700Y145796D02*
X901700Y159004D01*
X927100Y159004D02*
X927100Y145796D01*
X952500Y145796D02*
X952500Y159004D01*
X952500Y221996D02*
X952500Y235204D01*
X927100Y235204D02*
X927100Y221996D01*
X901700Y221996D02*
X901700Y235204D01*
X876300Y235204D02*
X876300Y221996D01*
X850900Y221996D02*
X850900Y235204D01*
X825500Y235204D02*
X825500Y221996D01*
X800100Y221996D02*
X800100Y235204D01*
X774700Y235204D02*
X774700Y221996D01*
X749300Y221996D02*
X749300Y235204D01*
X723900Y235204D02*
X723900Y221996D01*
X698500Y221996D02*
X698500Y235204D01*
X673100Y235204D02*
X673100Y221996D01*
X647700Y221996D02*
X647700Y235204D01*
X622300Y235204D02*
X622300Y221996D01*
D16*
X228600Y165100D03*
X203200Y165100D03*
X228600Y190500D03*
X203200Y190500D03*
X228600Y215900D03*
X203200Y215900D03*
X863600Y342900D03*
X838200Y342900D03*
X812800Y342900D03*
X787400Y342900D03*
X762000Y342900D03*
X736600Y342900D03*
X711200Y342900D03*
X685800Y342900D03*
X660400Y342900D03*
X635000Y342900D03*
X609600Y342900D03*
X584200Y342900D03*
X558800Y342900D03*
X533400Y342900D03*
X508000Y342900D03*
X482600Y342900D03*
X457200Y342900D03*
X431800Y342900D03*
X406400Y342900D03*
X76200Y342900D03*
X76200Y114300D03*
X406400Y114300D03*
X431800Y114300D03*
X457200Y114300D03*
X482600Y114300D03*
X508000Y114300D03*
X533400Y114300D03*
X558800Y114300D03*
X584200Y114300D03*
X609600Y114300D03*
X635000Y114300D03*
X660400Y114300D03*
X685800Y114300D03*
X711200Y114300D03*
X736600Y114300D03*
X762000Y114300D03*
X787400Y114300D03*
X812800Y114300D03*
X838200Y114300D03*
X863600Y114300D03*
X381000Y342900D03*
X355600Y342900D03*
X330200Y342900D03*
X304800Y342900D03*
X279400Y342900D03*
X254000Y342900D03*
X228600Y342900D03*
X203200Y342900D03*
X177800Y342900D03*
X152400Y342900D03*
X127000Y342900D03*
X101600Y342900D03*
X381000Y114300D03*
X355600Y114300D03*
X330200Y114300D03*
X304800Y114300D03*
X279400Y114300D03*
X254000Y114300D03*
X228600Y114300D03*
X203200Y114300D03*
X177800Y114300D03*
X152400Y114300D03*
X127000Y114300D03*
X101600Y114300D03*
D15*
X127000Y165100D03*
X177800Y165100D03*
X127000Y190500D03*
X177800Y190500D03*
X127000Y215900D03*
X177800Y215900D03*
D10*
X32004Y292100D02*
X18796Y292100D01*
X18796Y266700D02*
X32004Y266700D01*
X32004Y241300D02*
X18796Y241300D01*
X18796Y215900D02*
X32004Y215900D01*
X32004Y190500D02*
X18796Y190500D01*
X18796Y165100D02*
X32004Y165100D01*
D17*
X584200Y228600D03*
X584200Y177800D03*
X584200Y203200D03*
X584200Y355600D03*
X584200Y304800D03*
X584200Y330200D03*
X279400Y381000D03*
X279400Y330200D03*
X279400Y355600D03*
D18*
X457200Y368300D03*
X406400Y368300D03*
X431800Y368300D03*
X381000Y368300D03*
X330200Y368300D03*
X355600Y368300D03*
X977900Y101600D03*
D14*
X998220Y101600D03*
D18*
X977900Y378460D03*
D14*
X998220Y378460D03*
D19*
X520700Y304800D03*
X546100Y304800D03*
X520700Y279400D03*
X546100Y279400D03*
X520700Y254000D03*
X546100Y254000D03*
X520700Y228600D03*
X546100Y228600D03*
X520700Y203200D03*
X546100Y203200D03*
X876300Y38100D03*
X850900Y38100D03*
X825500Y38100D03*
X800100Y38100D03*
X774700Y38100D03*
X749300Y38100D03*
X723900Y38100D03*
X698500Y38100D03*
X673100Y38100D03*
X647700Y38100D03*
X622300Y38100D03*
X596900Y38100D03*
X571500Y38100D03*
X546100Y38100D03*
X520700Y38100D03*
X495300Y38100D03*
X469900Y38100D03*
X444500Y38100D03*
X419100Y38100D03*
X393700Y38100D03*
X368300Y38100D03*
X342900Y38100D03*
X317500Y38100D03*
X292100Y38100D03*
X266700Y38100D03*
X241300Y38100D03*
X215900Y38100D03*
X190500Y38100D03*
X165100Y38100D03*
X139700Y38100D03*
X114300Y38100D03*
X88900Y38100D03*
X876300Y88900D03*
X850900Y88900D03*
X825500Y88900D03*
X800100Y88900D03*
X774700Y88900D03*
X749300Y88900D03*
X723900Y88900D03*
X698500Y88900D03*
X673100Y88900D03*
X647700Y88900D03*
X622300Y88900D03*
X596900Y88900D03*
X571500Y88900D03*
X546100Y88900D03*
X520700Y88900D03*
X495300Y88900D03*
X469900Y88900D03*
X444500Y88900D03*
X419100Y88900D03*
X393700Y88900D03*
X368300Y88900D03*
X342900Y88900D03*
X317500Y88900D03*
X292100Y88900D03*
X266700Y88900D03*
X241300Y88900D03*
X215900Y88900D03*
X190500Y88900D03*
X165100Y88900D03*
X139700Y88900D03*
X114300Y88900D03*
X88900Y88900D03*
X876300Y63500D03*
X850900Y63500D03*
X825500Y63500D03*
X800100Y63500D03*
X774700Y63500D03*
X749300Y63500D03*
X723900Y63500D03*
X698500Y63500D03*
X673100Y63500D03*
X647700Y63500D03*
X622300Y63500D03*
X596900Y63500D03*
X571500Y63500D03*
X546100Y63500D03*
X520700Y63500D03*
X495300Y63500D03*
X469900Y63500D03*
X444500Y63500D03*
X419100Y63500D03*
X393700Y63500D03*
X368300Y63500D03*
X342900Y63500D03*
X317500Y63500D03*
X292100Y63500D03*
X266700Y63500D03*
X241300Y63500D03*
X215900Y63500D03*
X190500Y63500D03*
X165100Y63500D03*
X139700Y63500D03*
X114300Y63500D03*
X88900Y63500D03*
M02*

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,14 @@ G75*
%AMOC8*
5,1,8,0,0,1.08239X$1,22.5*%
G01*
%ADD10R,1.600200X1.168400*%
D10*
X271780Y543560D03*
X271780Y558800D03*
X271780Y574040D03*
X236220Y574040D03*
X236220Y558800D03*
X236220Y543560D03*
M02*

View File

@ -10,110 +10,815 @@ G75*
G01*
%ADD10R,1.500000X0.350000*%
%ADD11R,0.350000X1.500000*%
%ADD12R,1.600000X1.300000*%
%ADD13R,1.300000X1.600000*%
%ADD14R,0.300000X1.000000*%
%ADD15R,1.300000X1.500000*%
%ADD16R,1.500000X1.300000*%
%ADD17R,0.660400X2.032000*%
%ADD18R,1.930400X5.334000*%
D10*
X326400Y314000D03*
X326400Y309000D03*
X326400Y304000D03*
X326400Y299000D03*
X326400Y294000D03*
X326400Y289000D03*
X326400Y284000D03*
X326400Y279000D03*
X326400Y274000D03*
X326400Y269000D03*
X326400Y264000D03*
X326400Y259000D03*
X326400Y254000D03*
X326400Y249000D03*
X326400Y244000D03*
X326400Y239000D03*
X326400Y234000D03*
X326400Y229000D03*
X326400Y224000D03*
X326400Y219000D03*
X326400Y214000D03*
X326400Y209000D03*
X326400Y204000D03*
X326400Y199000D03*
X326400Y194000D03*
G36*
X352045Y497923D02*
X341440Y487318D01*
X338965Y489793D01*
X349570Y500398D01*
X352045Y497923D01*
G37*
G36*
X355581Y494387D02*
X344976Y483782D01*
X342501Y486257D01*
X353106Y496862D01*
X355581Y494387D01*
G37*
G36*
X359116Y490852D02*
X348511Y480247D01*
X346036Y482722D01*
X356641Y493327D01*
X359116Y490852D01*
G37*
G36*
X362652Y487316D02*
X352047Y476711D01*
X349572Y479186D01*
X360177Y489791D01*
X362652Y487316D01*
G37*
G36*
X366187Y483781D02*
X355582Y473176D01*
X353107Y475651D01*
X363712Y486256D01*
X366187Y483781D01*
G37*
G36*
X369723Y480245D02*
X359118Y469640D01*
X356643Y472115D01*
X367248Y482720D01*
X369723Y480245D01*
G37*
G36*
X373258Y476710D02*
X362653Y466105D01*
X360178Y468580D01*
X370783Y479185D01*
X373258Y476710D01*
G37*
G36*
X376794Y473174D02*
X366189Y462569D01*
X363714Y465044D01*
X374319Y475649D01*
X376794Y473174D01*
G37*
G36*
X380329Y469639D02*
X369724Y459034D01*
X367249Y461509D01*
X377854Y472114D01*
X380329Y469639D01*
G37*
G36*
X383865Y466103D02*
X373260Y455498D01*
X370785Y457973D01*
X381390Y468578D01*
X383865Y466103D01*
G37*
G36*
X387400Y462568D02*
X376795Y451963D01*
X374320Y454438D01*
X384925Y465043D01*
X387400Y462568D01*
G37*
G36*
X390936Y459032D02*
X380331Y448427D01*
X377856Y450902D01*
X388461Y461507D01*
X390936Y459032D01*
G37*
G36*
X394471Y455496D02*
X383866Y444891D01*
X381391Y447366D01*
X391996Y457971D01*
X394471Y455496D01*
G37*
G36*
X398007Y451961D02*
X387402Y441356D01*
X384927Y443831D01*
X395532Y454436D01*
X398007Y451961D01*
G37*
G36*
X401543Y448425D02*
X390938Y437820D01*
X388463Y440295D01*
X399068Y450900D01*
X401543Y448425D01*
G37*
G36*
X405078Y444890D02*
X394473Y434285D01*
X391998Y436760D01*
X402603Y447365D01*
X405078Y444890D01*
G37*
G36*
X408614Y441354D02*
X398009Y430749D01*
X395534Y433224D01*
X406139Y443829D01*
X408614Y441354D01*
G37*
G36*
X412149Y437819D02*
X401544Y427214D01*
X399069Y429689D01*
X409674Y440294D01*
X412149Y437819D01*
G37*
G36*
X415685Y434283D02*
X405080Y423678D01*
X402605Y426153D01*
X413210Y436758D01*
X415685Y434283D01*
G37*
G36*
X419220Y430748D02*
X408615Y420143D01*
X406140Y422618D01*
X416745Y433223D01*
X419220Y430748D01*
G37*
G36*
X422756Y427212D02*
X412151Y416607D01*
X409676Y419082D01*
X420281Y429687D01*
X422756Y427212D01*
G37*
G36*
X426291Y423677D02*
X415686Y413072D01*
X413211Y415547D01*
X423816Y426152D01*
X426291Y423677D01*
G37*
G36*
X429827Y420141D02*
X419222Y409536D01*
X416747Y412011D01*
X427352Y422616D01*
X429827Y420141D01*
G37*
G36*
X433362Y416606D02*
X422757Y406001D01*
X420282Y408476D01*
X430887Y419081D01*
X433362Y416606D01*
G37*
G36*
X436898Y413070D02*
X426293Y402465D01*
X423818Y404940D01*
X434423Y415545D01*
X436898Y413070D01*
G37*
D11*
X346400Y174000D03*
X351400Y174000D03*
X356400Y174000D03*
X361400Y174000D03*
X366400Y174000D03*
X371400Y174000D03*
X376400Y174000D03*
X381400Y174000D03*
X386400Y174000D03*
X391400Y174000D03*
X396400Y174000D03*
X401400Y174000D03*
X406400Y174000D03*
X411400Y174000D03*
X416400Y174000D03*
X421400Y174000D03*
X426400Y174000D03*
X431400Y174000D03*
X436400Y174000D03*
X441400Y174000D03*
X446400Y174000D03*
X451400Y174000D03*
X456400Y174000D03*
X461400Y174000D03*
X466400Y174000D03*
G36*
X465182Y404940D02*
X462707Y402465D01*
X452102Y413070D01*
X454577Y415545D01*
X465182Y404940D01*
G37*
G36*
X468718Y408476D02*
X466243Y406001D01*
X455638Y416606D01*
X458113Y419081D01*
X468718Y408476D01*
G37*
G36*
X472253Y412011D02*
X469778Y409536D01*
X459173Y420141D01*
X461648Y422616D01*
X472253Y412011D01*
G37*
G36*
X475789Y415547D02*
X473314Y413072D01*
X462709Y423677D01*
X465184Y426152D01*
X475789Y415547D01*
G37*
G36*
X479324Y419082D02*
X476849Y416607D01*
X466244Y427212D01*
X468719Y429687D01*
X479324Y419082D01*
G37*
G36*
X482860Y422618D02*
X480385Y420143D01*
X469780Y430748D01*
X472255Y433223D01*
X482860Y422618D01*
G37*
G36*
X486395Y426153D02*
X483920Y423678D01*
X473315Y434283D01*
X475790Y436758D01*
X486395Y426153D01*
G37*
G36*
X489931Y429689D02*
X487456Y427214D01*
X476851Y437819D01*
X479326Y440294D01*
X489931Y429689D01*
G37*
G36*
X493466Y433224D02*
X490991Y430749D01*
X480386Y441354D01*
X482861Y443829D01*
X493466Y433224D01*
G37*
G36*
X497002Y436760D02*
X494527Y434285D01*
X483922Y444890D01*
X486397Y447365D01*
X497002Y436760D01*
G37*
G36*
X500537Y440295D02*
X498062Y437820D01*
X487457Y448425D01*
X489932Y450900D01*
X500537Y440295D01*
G37*
G36*
X504073Y443831D02*
X501598Y441356D01*
X490993Y451961D01*
X493468Y454436D01*
X504073Y443831D01*
G37*
G36*
X507609Y447366D02*
X505134Y444891D01*
X494529Y455496D01*
X497004Y457971D01*
X507609Y447366D01*
G37*
G36*
X511144Y450902D02*
X508669Y448427D01*
X498064Y459032D01*
X500539Y461507D01*
X511144Y450902D01*
G37*
G36*
X514680Y454438D02*
X512205Y451963D01*
X501600Y462568D01*
X504075Y465043D01*
X514680Y454438D01*
G37*
G36*
X518215Y457973D02*
X515740Y455498D01*
X505135Y466103D01*
X507610Y468578D01*
X518215Y457973D01*
G37*
G36*
X521751Y461509D02*
X519276Y459034D01*
X508671Y469639D01*
X511146Y472114D01*
X521751Y461509D01*
G37*
G36*
X525286Y465044D02*
X522811Y462569D01*
X512206Y473174D01*
X514681Y475649D01*
X525286Y465044D01*
G37*
G36*
X528822Y468580D02*
X526347Y466105D01*
X515742Y476710D01*
X518217Y479185D01*
X528822Y468580D01*
G37*
G36*
X532357Y472115D02*
X529882Y469640D01*
X519277Y480245D01*
X521752Y482720D01*
X532357Y472115D01*
G37*
G36*
X535893Y475651D02*
X533418Y473176D01*
X522813Y483781D01*
X525288Y486256D01*
X535893Y475651D01*
G37*
G36*
X539428Y479186D02*
X536953Y476711D01*
X526348Y487316D01*
X528823Y489791D01*
X539428Y479186D01*
G37*
G36*
X542964Y482722D02*
X540489Y480247D01*
X529884Y490852D01*
X532359Y493327D01*
X542964Y482722D01*
G37*
G36*
X546499Y486257D02*
X544024Y483782D01*
X533419Y494387D01*
X535894Y496862D01*
X546499Y486257D01*
G37*
G36*
X550035Y489793D02*
X547560Y487318D01*
X536955Y497923D01*
X539430Y500398D01*
X550035Y489793D01*
G37*
D10*
X486400Y194000D03*
X486400Y199000D03*
X486400Y204000D03*
X486400Y209000D03*
X486400Y214000D03*
X486400Y219000D03*
X486400Y224000D03*
X486400Y229000D03*
X486400Y234000D03*
X486400Y239000D03*
X486400Y244000D03*
X486400Y249000D03*
X486400Y254000D03*
X486400Y259000D03*
X486400Y264000D03*
X486400Y269000D03*
X486400Y274000D03*
X486400Y279000D03*
X486400Y284000D03*
X486400Y289000D03*
X486400Y294000D03*
X486400Y299000D03*
X486400Y304000D03*
X486400Y309000D03*
X486400Y314000D03*
G36*
X550035Y526207D02*
X539430Y515602D01*
X536955Y518077D01*
X547560Y528682D01*
X550035Y526207D01*
G37*
G36*
X546499Y529743D02*
X535894Y519138D01*
X533419Y521613D01*
X544024Y532218D01*
X546499Y529743D01*
G37*
G36*
X542964Y533278D02*
X532359Y522673D01*
X529884Y525148D01*
X540489Y535753D01*
X542964Y533278D01*
G37*
G36*
X539428Y536814D02*
X528823Y526209D01*
X526348Y528684D01*
X536953Y539289D01*
X539428Y536814D01*
G37*
G36*
X535893Y540349D02*
X525288Y529744D01*
X522813Y532219D01*
X533418Y542824D01*
X535893Y540349D01*
G37*
G36*
X532357Y543885D02*
X521752Y533280D01*
X519277Y535755D01*
X529882Y546360D01*
X532357Y543885D01*
G37*
G36*
X528822Y547420D02*
X518217Y536815D01*
X515742Y539290D01*
X526347Y549895D01*
X528822Y547420D01*
G37*
G36*
X525286Y550956D02*
X514681Y540351D01*
X512206Y542826D01*
X522811Y553431D01*
X525286Y550956D01*
G37*
G36*
X521751Y554491D02*
X511146Y543886D01*
X508671Y546361D01*
X519276Y556966D01*
X521751Y554491D01*
G37*
G36*
X518215Y558027D02*
X507610Y547422D01*
X505135Y549897D01*
X515740Y560502D01*
X518215Y558027D01*
G37*
G36*
X514680Y561562D02*
X504075Y550957D01*
X501600Y553432D01*
X512205Y564037D01*
X514680Y561562D01*
G37*
G36*
X511144Y565098D02*
X500539Y554493D01*
X498064Y556968D01*
X508669Y567573D01*
X511144Y565098D01*
G37*
G36*
X507609Y568634D02*
X497004Y558029D01*
X494529Y560504D01*
X505134Y571109D01*
X507609Y568634D01*
G37*
G36*
X504073Y572169D02*
X493468Y561564D01*
X490993Y564039D01*
X501598Y574644D01*
X504073Y572169D01*
G37*
G36*
X500537Y575705D02*
X489932Y565100D01*
X487457Y567575D01*
X498062Y578180D01*
X500537Y575705D01*
G37*
G36*
X497002Y579240D02*
X486397Y568635D01*
X483922Y571110D01*
X494527Y581715D01*
X497002Y579240D01*
G37*
G36*
X493466Y582776D02*
X482861Y572171D01*
X480386Y574646D01*
X490991Y585251D01*
X493466Y582776D01*
G37*
G36*
X489931Y586311D02*
X479326Y575706D01*
X476851Y578181D01*
X487456Y588786D01*
X489931Y586311D01*
G37*
G36*
X486395Y589847D02*
X475790Y579242D01*
X473315Y581717D01*
X483920Y592322D01*
X486395Y589847D01*
G37*
G36*
X482860Y593382D02*
X472255Y582777D01*
X469780Y585252D01*
X480385Y595857D01*
X482860Y593382D01*
G37*
G36*
X479324Y596918D02*
X468719Y586313D01*
X466244Y588788D01*
X476849Y599393D01*
X479324Y596918D01*
G37*
G36*
X475789Y600453D02*
X465184Y589848D01*
X462709Y592323D01*
X473314Y602928D01*
X475789Y600453D01*
G37*
G36*
X472253Y603989D02*
X461648Y593384D01*
X459173Y595859D01*
X469778Y606464D01*
X472253Y603989D01*
G37*
G36*
X468718Y607524D02*
X458113Y596919D01*
X455638Y599394D01*
X466243Y609999D01*
X468718Y607524D01*
G37*
G36*
X465182Y611060D02*
X454577Y600455D01*
X452102Y602930D01*
X462707Y613535D01*
X465182Y611060D01*
G37*
D11*
X466400Y334000D03*
X461400Y334000D03*
X456400Y334000D03*
X451400Y334000D03*
X446400Y334000D03*
X441400Y334000D03*
X436400Y334000D03*
X431400Y334000D03*
X426400Y334000D03*
X421400Y334000D03*
X416400Y334000D03*
X411400Y334000D03*
X406400Y334000D03*
X401400Y334000D03*
X396400Y334000D03*
X391400Y334000D03*
X386400Y334000D03*
X381400Y334000D03*
X376400Y334000D03*
X371400Y334000D03*
X366400Y334000D03*
X361400Y334000D03*
X356400Y334000D03*
X351400Y334000D03*
X346400Y334000D03*
G36*
X436898Y602930D02*
X434423Y600455D01*
X423818Y611060D01*
X426293Y613535D01*
X436898Y602930D01*
G37*
G36*
X433362Y599394D02*
X430887Y596919D01*
X420282Y607524D01*
X422757Y609999D01*
X433362Y599394D01*
G37*
G36*
X429827Y595859D02*
X427352Y593384D01*
X416747Y603989D01*
X419222Y606464D01*
X429827Y595859D01*
G37*
G36*
X426291Y592323D02*
X423816Y589848D01*
X413211Y600453D01*
X415686Y602928D01*
X426291Y592323D01*
G37*
G36*
X422756Y588788D02*
X420281Y586313D01*
X409676Y596918D01*
X412151Y599393D01*
X422756Y588788D01*
G37*
G36*
X419220Y585252D02*
X416745Y582777D01*
X406140Y593382D01*
X408615Y595857D01*
X419220Y585252D01*
G37*
G36*
X415685Y581717D02*
X413210Y579242D01*
X402605Y589847D01*
X405080Y592322D01*
X415685Y581717D01*
G37*
G36*
X412149Y578181D02*
X409674Y575706D01*
X399069Y586311D01*
X401544Y588786D01*
X412149Y578181D01*
G37*
G36*
X408614Y574646D02*
X406139Y572171D01*
X395534Y582776D01*
X398009Y585251D01*
X408614Y574646D01*
G37*
G36*
X405078Y571110D02*
X402603Y568635D01*
X391998Y579240D01*
X394473Y581715D01*
X405078Y571110D01*
G37*
G36*
X401543Y567575D02*
X399068Y565100D01*
X388463Y575705D01*
X390938Y578180D01*
X401543Y567575D01*
G37*
G36*
X398007Y564039D02*
X395532Y561564D01*
X384927Y572169D01*
X387402Y574644D01*
X398007Y564039D01*
G37*
G36*
X394471Y560504D02*
X391996Y558029D01*
X381391Y568634D01*
X383866Y571109D01*
X394471Y560504D01*
G37*
G36*
X390936Y556968D02*
X388461Y554493D01*
X377856Y565098D01*
X380331Y567573D01*
X390936Y556968D01*
G37*
G36*
X387400Y553432D02*
X384925Y550957D01*
X374320Y561562D01*
X376795Y564037D01*
X387400Y553432D01*
G37*
G36*
X383865Y549897D02*
X381390Y547422D01*
X370785Y558027D01*
X373260Y560502D01*
X383865Y549897D01*
G37*
G36*
X380329Y546361D02*
X377854Y543886D01*
X367249Y554491D01*
X369724Y556966D01*
X380329Y546361D01*
G37*
G36*
X376794Y542826D02*
X374319Y540351D01*
X363714Y550956D01*
X366189Y553431D01*
X376794Y542826D01*
G37*
G36*
X373258Y539290D02*
X370783Y536815D01*
X360178Y547420D01*
X362653Y549895D01*
X373258Y539290D01*
G37*
G36*
X369723Y535755D02*
X367248Y533280D01*
X356643Y543885D01*
X359118Y546360D01*
X369723Y535755D01*
G37*
G36*
X366187Y532219D02*
X363712Y529744D01*
X353107Y540349D01*
X355582Y542824D01*
X366187Y532219D01*
G37*
G36*
X362652Y528684D02*
X360177Y526209D01*
X349572Y536814D01*
X352047Y539289D01*
X362652Y528684D01*
G37*
G36*
X359116Y525148D02*
X356641Y522673D01*
X346036Y533278D01*
X348511Y535753D01*
X359116Y525148D01*
G37*
G36*
X355581Y521613D02*
X353106Y519138D01*
X342501Y529743D01*
X344976Y532218D01*
X355581Y521613D01*
G37*
G36*
X352045Y518077D02*
X349570Y515602D01*
X338965Y526207D01*
X341440Y528682D01*
X352045Y518077D01*
G37*
D12*
X736600Y558640D03*
X736600Y538640D03*
X850900Y558640D03*
X850900Y538640D03*
D13*
X244000Y502920D03*
X264000Y502920D03*
D12*
X327660Y498000D03*
X327660Y518000D03*
X566420Y518000D03*
X566420Y498000D03*
X160020Y543400D03*
X160020Y523400D03*
X160020Y574200D03*
X160020Y594200D03*
D14*
X683050Y573000D03*
X677550Y573000D03*
X672050Y573000D03*
X666550Y573000D03*
X661050Y573000D03*
X655550Y573000D03*
X650050Y573000D03*
X650050Y443000D03*
X655550Y443000D03*
X661050Y443000D03*
X666550Y443000D03*
X672050Y443000D03*
X677550Y443000D03*
X683050Y443000D03*
X688550Y443000D03*
X694050Y443000D03*
X699550Y443000D03*
X705050Y443000D03*
X710550Y443000D03*
X716050Y443000D03*
X721550Y443000D03*
X721550Y573000D03*
X716050Y573000D03*
X710550Y573000D03*
X705050Y573000D03*
X699550Y573000D03*
X694050Y573000D03*
X688550Y573000D03*
X797350Y573000D03*
X791850Y573000D03*
X786350Y573000D03*
X780850Y573000D03*
X775350Y573000D03*
X769850Y573000D03*
X764350Y573000D03*
X764350Y443000D03*
X769850Y443000D03*
X775350Y443000D03*
X780850Y443000D03*
X786350Y443000D03*
X791850Y443000D03*
X797350Y443000D03*
X802850Y443000D03*
X808350Y443000D03*
X813850Y443000D03*
X819350Y443000D03*
X824850Y443000D03*
X830350Y443000D03*
X835850Y443000D03*
X835850Y573000D03*
X830350Y573000D03*
X824850Y573000D03*
X819350Y573000D03*
X813850Y573000D03*
X808350Y573000D03*
X802850Y573000D03*
D15*
X244500Y457200D03*
X263500Y457200D03*
X244500Y431800D03*
X263500Y431800D03*
X244500Y406400D03*
X263500Y406400D03*
D16*
X127000Y574700D03*
X127000Y593700D03*
X101600Y574700D03*
X101600Y593700D03*
D17*
X234950Y528066D03*
X234950Y589534D03*
X247650Y528066D03*
X260350Y528066D03*
X247650Y589534D03*
X260350Y589534D03*
X273050Y528066D03*
X273050Y589534D03*
D18*
X198120Y607060D03*
X198120Y510540D03*
M02*

View File

@ -1,24 +1,28 @@
# SE-VGA
Simple CPLD project to mirror the Mac SE video over VGA. No scaling is performed -- the Mac 512x342 video is displayed letterboxed (black borders) in a 640x480 frame. Plugs into SE PDS slot and snoops writes to the frame buffer memory locations. Writes are cached and copied to VRAM.
Simple CPLD project to mirror the Mac SE video over VGA. The image is pixel-doubled to 1024x684 and displayed letterboxed (black borders) in a 1024x768 video frame. Device snoops writes to the frame buffer memory locations and caches the data to its own VRAM for display. Plugs into the PDS slot in a Mac SE, or plugs in place of the CPU on Mac SE, Plus, or 512k models (128k Mac could be made to work with some adjustment to the CPLD configuration, but is not a configuration supported by the memory selection jumpers).
Circuit uses a single AFT1508AS-100AU CPLD, a pair of 256kbit (32kx8) 15ns SRAM, and a 25.175MHz can oscillator, along with some passives.
Circuit uses a single AFT1508AS-7AX100 CPLD, a pair of 256kbit (32kx8) 15ns or faster SRAM, a 13MHz crystal with 5x clock multiplier for 65MHz pixel clock, along with some passives.
## Bill of Materials
| Qty | Manufacturer | Part No. | Name | Description |
|:---:|:----------------|:-------------------|:-------------------|:----------------------------------------------|
| 2 | Renesas | 71256SA12TPG | VRAM-ALT, VRAM-MAIN| 32kx8 15ns SRAM |
| 1 | Microchip | ATF1508AS-7AX100 | LOGIC | ATF1508AS or EPM7128 CPLD |
| 1 | CTS | MXO45HS-3C-25M1750 | CLK | 25.175MHz oscillator |
| 2 | ISSI | IS61C256AL-12TLI | VRAM-ALT, VRAM-MAIN| 32kx8 12ns SRAM, TSOP-28 |
| 1 | Microchip | ATF1508AS-7AX100 | LOGIC | ATF1508AS or EPM7128 CPLD, TQFP-100 |
| 1 | Renesas / IDT | 511MLF | CLK | Programmable Clock Multiplier, SO-8 |
| 1 | ECS | ECS-130-20-46X | XTAL | 13MHz Crystal, HC-46X or HC-49UP |
| 1 | TE Connectivity | 650473-5 | PDS | DIN 41612 Right-angle 3x32 pin male connector |
| 5 | | | C1, C2, C3, C4, C5 | 0.1uF Decoupling Capacitor |
| 5 | | | C1, C2, C3, C4, C5 | 0.1uF Decoupling Capacitor, 0805 |
| 2 | | | C6, C7 | 10uF Electrolytic Capacitor |
| 2 | | | R7, R8, R9 | 4k7 pullup resistor (value not critical) |
| 3 | | | R1, R2, R3 | 470 ohm resistor |
| 3 | | | R4, R5, R6 | 75 ohm resistor |
| 2 | | | C8, C9 | 20pF Capacitor, 0805 |
| 2 | | | R3, R4, R5 | 10k pullup resistor, 0805 or axial |
| 3 | | | R2 | 460 ohm resistor, 0805 or axial |
| 3 | | | R1 | 75 ohm resistor, 0805 or axial |
| 1 | | | PGM | 2x5 pin header for CPLD JTAG programming |
| 1 | | | VGA | 6x1 pin header for VGA adapter |
| 1 | | | VGA | 2x5 pin header for VGA adapter |
| 1 | | | RAMSIZE | 3x2 jumper |
| 1 | | | BRD | 64-pin DIP header, male |
| 1 | | | CPU | 64-pin DIP socket, female |
## Frame Buffer Addressing
@ -124,11 +128,11 @@ Logic uses nearly all available resources in the CPLD (104 of 128 macrocells).
|TMS|Input|PIN_15
## Known Issues
First run schematic and gerbers used three pairs of resistor dividers for R, G, B output channels. A better approach would be to use a single divider and tie all three output channels together. Also 470 ohm is a bit too high, so the image is quite dark.
~~First run schematic and gerbers used three pairs of resistor dividers for R, G, B output channels. A better approach would be to use a single divider and tie all three output channels together. Also 470 ohm is a bit too high, so the image is quite dark.~~ Removed extraneous resistor dividers. Changed 470ohm resistor to 460.
The resistor footprints are too small for 1/4W parts. Might work with 1/8W parts.
~~The resistor footprints are too small for 1/4W parts. Might work with 1/8W parts.~~ Added footprints for 0805 resistors.
Timing for the SE window is a bit off. It appears to be starting the window a couple pixels early on the left, and it might be cutting off the last pixel or two on the right.
## Wish List
I would like to bump up the pixel clock to 65MHz and run the output video at 1024x768@60. This would allow the SE frame to be pixel doubled to 1024x684, which would only leave black bars on the top and bottom, instead of on all four sides. This could also be a useful starting point for a future project to output video for an early iPad display for units missing a CRT.
~~I would like to bump up the pixel clock to 65MHz and run the output video at 1024x768@60. This would allow the SE frame to be pixel doubled to 1024x684, which would only leave black bars on the top and bottom, instead of on all four sides. This could also be a useful starting point for a future project to output video for an early iPad display for units missing a CRT. ~~

BIN
SE-VGA_Schematic.pdf Normal file

Binary file not shown.

229
old/se-xga_bad.sv Normal file
View File

@ -0,0 +1,229 @@
/******************************************************************************
* SE-VGA
* Top-level module
* techav
* 2021-10-16
******************************************************************************
* Trying again again again
*****************************************************************************/
module sevga (
input wire nReset, // System reset signal
input wire pixClk, // 65MHz pixel clock
output reg nhSync, // HSync signal
output reg nvSync, // VSync signal
output reg vidOut, // 1-bit Monochrome video signal
output logic [14:0] vramAddr, // VRAM Address bus
inout logic [7:0] vramData, // VRAM Data bus
output reg nvramOE, // VRAM Read strobe
output reg nvramWE, // VRAM Write strobe
output reg nvramCE0, // VRAM Main chip select signal
output reg nvramCE1, // VRAM Alt chip select signal
input wire [23:1] cpuAddr, // CPU Address bus
input wire [15:0] cpuData, // CPU Data bus
input wire ncpuAS, // CPU Address Strobe signal
input wire ncpuUDS, // CPU Upper Data Strobe signal
input wire ncpuLDS, // CPU Lower Data Strobe signal
input wire cpuRnW, // CPU Read/Write select signal
input logic [2:0] ramSize // Select installed RAM size
);
/******************************************************************************
* Initial Video Signal Timing
* The following functions establish the basic XGA signal timing and
* assert the horizontal and vertical sync signals as appropriate.
* These functions are the minimum required for a signal presence detect test.
*****************************************************************************/
// Primary sync counters
logic [10:0] hCount; // 0..1343
logic [9:0] vCount; // 0..805
always @(negedge pixClk) begin
if(hCount < 1343) hCount <= hCount + 11'h1;
else begin
hCount <= 0;
if(vCount <= 805) vCount <= vCount + 10'h1;
else vCount <= 0;
end
end
// Horizontal sync
always @(negedge pixClk) begin
if(hCount == 0) nhSync <= 1;
else if(hCount == 1052) nhSync <= 0;
else if(hCount == 1186) nhSync <= 1;
end
// Vertical sync
always @(negedge pixClk) begin
if(vCount == 0) nvSync <= 1;
else if(vCount == 729) nvSync <= 0;
else if(vCount == 734) nvSync <= 0;
end
/******************************************************************************
* Useful signals
* Here we break out a few useful signals, derived from the timing above, that
* will help us elsewhere.
*****************************************************************************/
// Horizontal active
reg hActive;
always @(negedge pixClk) begin
if(hCount == 0) hActive <= 1;
else if(hCount == 1023) hActive <= 0;
else if(hCount == 1343) hActive <= 1;
end
// Vertical active
reg vActive;
always @(negedge pixClk) begin
if(vCount == 0) vActive <= 1;
else if(vCount == 683) vActive <= 0;
else if(vCount == 805) vActive <= 1;
end
// Horizontal fetch active
// asserted just before active video to enable video data pre-fetch
reg fhActive;
always @(negedge pixClk) begin
if(hCount == 0) fhActive <= 1;
else if(hCount == 1022) fhActive <= 0;
else if(hCount == 1342) fhActive <= 1;
end
// Vertical fetch active
//
reg fvActive;
always @(negedge pixClk) begin
if(vCount == 0) fvActive <= 1;
else if(vCount == 684) fvActive <= 0;
if(vCount == 805) fvActive <= 1;
end
// combined active signals
wire vidActive = hActive & vActive;
wire fetchActive = fhActive & fvActive;
/******************************************************************************
* VRAM State Machine
* Coordinates VRAM load/store actions
*****************************************************************************/
// rising edge signals: nvramWE, nvramOE, nvramCE[1:0]
// falling edge signals: vramAddr, vramData
// VRAM read signal
//always @(posedge pixClk) begin nvramOE <= ~(hCount == 7); end
// VRAM write signal
always @(posedge pixClk) begin
if(hCount[3:1] == 0) nvramWE <= 1;
else if(hCount[3:1] == 1) nvramWE <= 0;
else if(hCount[3:1] == 6) nvramWE <= 1;
end
// VRAM data/address busses
always @(negedge pixClk) begin
if(hCount[0] && !hCount[1]) begin
case(hCount[3:2])
3: begin
// start read cycle
vramData <= 8'hZ;
vramAddr[14:6] <= vCount[9:1];
vramAddr[5:0] <= hCount[9:4];
end
default: begin
// write slots
vramAddr[14:1] <= cpuAddr[14:1] - 14'h1380;
if(!ncpuUDSr && !cpuLDSsrv) begin
vramAddr[0] <= 0;
vramData <= cpuData[15:8];
end else if(!ncpuLDSr && !cpuLDSsrv) begin
vramAddr[0] <= 1;
vramData <= cpuData[7:0];
end
end
endcase
end
end
// VRAM chip enable signals
reg cpuUDSsrv, cpuLDSsrv;
always @(posedge pixClk) begin
if(hCount[3:1] == 7 && fetchActive) begin
nvramCE0 <= vidBufSel;
nvramCE1 <= ~vidBufSel;
nvramOE <= 0;
end else if(!hCount[0] && hCount[1]) begin
// write cycle
if(!ncpuUDSr && !cpuUDSsrv) begin
nvramCE0 <= ~cpuAddr[15];
nvramCE1 <= cpuAddr[15];
cpuUDSsrv <= 1;
end else if(!ncpuLDSr && !cpuLDSsrv) begin
nvramCE0 <= ~cpuAddr[15];
nvramCE1 <= cpuAddr[15];
cpuLDSsrv <= 1;
end else begin
nvramCE0 <= 1;
nvramCE1 <= 1;
end
nvramOE <= 1;
end else begin
nvramCE0 <= 1;
nvramCE1 <= 1;
nvramOE <= 1;
end
// reset the upper/lower serve signals when cycle ended by CPU
if(ncpuLDS) cpuLDSsrv <= 0;
if(ncpuUDS) cpuUDSsrv <= 0;
end
// Video data shift register & output
reg [7:0] vidShiftr;
always @(negedge pixClk) begin
if(hCount[3:0] == 4'hF) vidShiftr <= ~vramData;
else if(hCount[0]) begin
vidShiftr[7:1] <= vidShiftr[6:0];
vidShiftr[0] <= 0;
end
end
always_comb begin
if(vidActive) vidOut = vidShiftr[7];
else vidOut <= 0;
end
/******************************************************************************
* CPU Bus Snooping
* Watches the CPU bus and aligns its operations with the pixel clock
*****************************************************************************/
reg ncpuUDSr, ncpuLDSr;
always @(negedge pixClk) begin
// this condition evaluates true when cpu is writing to video buffer
if(!ncpuAS && !cpuRnW
&& !cpuAddr[23] && !cpuAddr[22]
&& !(cpuAddr[21] ^ ramSize[2])
&& !(cpuAddr[20] ^ ramSize[1])
&& !(cpuAddr[19] ^ ramSize[0])
&& cpuAddr[18] && cpuAddr[17]
&& cpuAddr[16]
&& ((cpuAddr[14:1] >= 14'h1380)
&& (cpuAddr[14:1] < 14'h3E40)))
begin
if(!ncpuUDS) ncpuUDSr <= 0;
else ncpuUDSr <= 1;
if(!ncpuLDS) ncpuLDSr <= 0;
else ncpuLDSr <= 1;
end else begin
ncpuUDSr <= 1;
ncpuLDSr <= 1;
end
end
// hold low for now
reg vidBufSel = 0;
endmodule

342
se-xga.sv Normal file
View File

@ -0,0 +1,342 @@
/******************************************************************************
* SE-VGA
* Top-level module
* techav
* 2021-10-12
******************************************************************************
* This is ... mostly working. It has some write glitches and a vertical line
* five pixels from the left side of the screen.
*****************************************************************************/
module sevga (
input wire nReset, // System reset signal
input wire pixClk, // 65MHz pixel clock
output wire nhSync, // HSync signal
output wire nvSync, // VSync signal
output wire vidOut, // 1-bit Monochrome video signal
output logic [14:0] vramAddr, // VRAM Address bus
inout logic [7:0] vramData, // VRAM Data bus
output wire nvramOE, // VRAM Read strobe
output wire nvramWE, // VRAM Write strobe
output wire nvramCE0, // VRAM Main chip select signal
output wire nvramCE1, // VRAM Alt chip select signal
input logic [23:1] cpuAddr, // CPU Address bus
input logic [15:0] cpuData, // CPU Data bus
input wire ncpuAS, // CPU Address Strobe signal
input wire ncpuUDS, // CPU Upper Data Strobe signal
input wire ncpuLDS, // CPU Lower Data Strobe signal
input wire cpuRnW, // CPU Read/Write select signal
input logic [2:0] ramSize // Select installed RAM size
);
/******************************************************************************
* Initial Video Signal Timing
* The following four functions establish the basic XGA signal timing and
* assert the horizontal and vertical sync signals as appropriate.
* These functions are the minimum required for a signal presence detect test.
*****************************************************************************/
logic [10:0] hCount; // 0..1343
logic [9:0] vCount; // 0..805
wire nhSyncInner;
// Primary video sync counters -- Now more synchronous!
always @(negedge pixClk) begin
if(hCount < 11'd1343) hCount <= hCount + 11'd1;
else begin
hCount <= 11'd0;
if(vCount < 10'd805) vCount <= vCount + 10'd1;
else vCount <= 10'd0;
end
end
// horizontal and vertical sync signals
always_comb begin
//if(hCount >= 11'd1048 && hCount < 11'd1184) nhSyncInner <= 0;
if(hCount >= 11'd1052 && hCount < 11'd1187) nhSyncInner <= 0;
else nhSyncInner <= 1;
nhSync <= nhSyncInner;
if(vCount >= 10'd729 && vCount < 10'd735) nvSync <= 0;
else nvSync <= 1;
end
/******************************************************************************
* Useful signals
* Here we break out a few useful signals, derived from the timing above, that
* will help us elsewhere.
*****************************************************************************/
wire hActive, vActive; // active video signals. vidout black when negated
wire vidActive; // active when both hActive and vActive asserted
wire hLoad; // load pixel data from vram when asserted
assign vidActive = hActive & vActive;
always_comb begin
if(hCount >= 3 && hCount < 1027) hActive <= 1;
else hActive <= 0;
if(vCount >= 0 && vCount < 684) vActive <= 1;
else vActive <= 0;
if(hCount >= 0 && hCount < 1024 && vActive) hLoad <= 1;
else hLoad <= 0;
end
/******************************************************************************
* Primary State Machine
* This is the primary state machine which runs the entire system, handling
* VRAM reads, VRAM writes, VIA writes, and idle states
*****************************************************************************/
// used to align primary state machine with horizontal counter
wire [3:0] vSeq = hCount[3:0];
// define state machine states (Gray code)
parameter
S0 = 4'b0000, // VRAM Read 0
S1 = 4'b0001, // VRAM Read 1
S2 = 4'b0011, // Idle
S3 = 4'b0010, // VRAM Write Upper 0
S4 = 4'b0110, // VRAM Write Upper 1
S5 = 4'b0111, // VRAM Write Lower 0
S6 = 4'b0101, // VRAM Write Lower 1
S7 = 4'b0100, // VIA Write
S8 = 4'b1100, // VSync (to be added later)
S9 = 4'b1101, // undefined
S10 = 4'b1111, // undefined
S11 = 4'b1110, // undefined
S12 = 4'b1010, // undefined
S13 = 4'b1011, // undefined
S14 = 4'b1001, // undefined
S15 = 4'b1000; // undefined
logic [3:0] pState;
// And here is the much simplified primary state machine
always @(negedge pixClk or negedge nReset) begin
if(!nReset) pState <= S2; // resync on reset by jumping to idle state
else begin
case(pState)
S0: pState <= S1; // first VRAM read state, always move to S1
S3: pState <= S4; // first UDS write state, always move to S4
S5: pState <= S6; // first LDS write state, always move to S6
/*S7: begin
pState <= S2;
end*/
S2: begin
// here is where everything actually happens.
if(vSeq == 4'hF) pState <= S0; // time for a read state
else if(cpuUWriteReq && !cpuUWriteSrv && vSeq < 4'hD) pState <= S3;
else if(cpuLWriteReq && !cpuLWriteSrv && vSeq < 4'hD) pState <= S5;
else if(cpuVIAReq && !cpuVIASrv && vSeq < 4'hE) pState <= S7;
else pState <= S2;
end
default: pState <= S2; // everyone ends up at S2 (idle)
endcase
end
end
// primary VRAM signal combination, based on the primary state machine
always_comb begin
// VRAM Read Strobe
if((pState == S0 || pState == S1) && hLoad) nvramOE <= 0;
else nvramOE <= 1;
// VRAM Write Strobe
if(pState == S3 || pState == S5) nvramWE <= 0;
else nvramWE <= 1;
// VRAM Chip Enable Signals
case(pState)
S0, S1: begin
if(hLoad) begin
nvramCE0 <= ~vidBufSel;
nvramCE1 <= vidBufSel;
end else begin
nvramCE0 <= 1;
nvramCE1 <= 1;
end
end
S3, S4, S5, S6: begin
nvramCE0 <= ~cpuBufSel;
nvramCE1 <= cpuBufSel;
end
default: begin
nvramCE0 <= 1;
nvramCE1 <= 1;
end
endcase
// VRAM Address Bus
case(pState)
S0, S1: begin
// address bus for read cycles
if(hLoad) begin
vramAddr[14:6] <= vCount[9:1];
vramAddr[5:0] <= hCount[9:4];
end else begin
vramAddr <= 0;
end
end
S3, S4: begin
// address bus for upper write cycles
vramAddr[14:1] <= cpuAddrShift;
vramAddr[0] <= 0;
end
S5, S6: begin
// address bus for lower write cycles
vramAddr[14:1] <= cpuAddrShift;
vramAddr[0] <= 1;
end
default: begin
// address bus for idle cycles
vramAddr <= 0;
end
endcase
// VRAM Data bus
case(pState)
S3, S4 : vramData <= cpuData[15:8];
S5, S6 : vramData <= cpuData[7:0];
default: vramData <= 8'hZ;
endcase
end
/******************************************************************************
* Video Output Sequencing
* Here is the primary video output shift register sequencing.
* With these functions in place, it should be possible to strap the VRAM data
* signals and see the strapped pattern output on screen.
*****************************************************************************/
logic [8:0] vidData; // the video data we are displaying
// output shift register
always @(posedge pixClk) begin
if(pState == S1 && hLoad) begin
// store VRAM data in shift register
vidData[7:0] <= vramData;
end else if(!hCount[0] && vidActive) begin
// shift out video data
vidData[8:1] <= vidData[7:0];
vidData[0] <= 1;
end
end
// final video output
always_comb begin
if(vidActive) vidOut <= ~vidData[8];
else vidOut <= 0;
end
/******************************************************************************
* CPU Bus Snooping
* Watch the CPU bus for writes to the video buffer regions of memory and write
* that data to VRAM. VRAM write cycles can occur during vidSeq 1 through 7.
* High-order bytes are passed to VRAM on tick states and low-order bytes are
* passed to VRAM on tock states. After the VRAM writes are complete, state
* machine waits for the CPU cycle to end before returning to idle.
*****************************************************************************/
/* Main framebuffer starts $5900 below the top of RAM, alt frame buffer is
* $8000 below the main frame buffer
* ramSize is used to mask the CPU Address bits [21:19] to select the amount
* of memory installed in the computer. Not all possible ramSize selections
* are valid memory sizes when using 30-pin SIMMs in the Mac SE.
* They may be possible using PDS RAM expansion cards.
* ramSize mainBuffer altBuffer ramTop+1 ramSize Valid? Installed SIMMs
* $7 $3fa700 $3f2700 $400000 4.0MB Y [ 1MB 1MB ][ 1MB 1MB ]
* $6 $37a700 $372700 $380000 3.5MB N
* $5 $2fa700 $2f2700 $300000 3.0MB N
* $4 $27a700 $272700 $280000 2.5MB Y [ 1MB 1MB ][256kB 256kB]
* $3 $1fa700 $1f2700 $200000 2.0MB Y [ 1MB 1MB ][ --- --- ]
* $2 $17a700 $172700 $180000 1.5MB N
* $1 $0fa700 $0f2700 $100000 1.0MB Y [256kB 256kB][256kB 256kB]
* $0 $07a700 $072700 $080000 0.5MB Y [256kB 256kB][ --- --- ]
*/
// keep track of pending CPU write requests and whether they have been serviced
wire cpuUWriteReq, cpuLWriteReq, cpuVIAReq;
reg cpuUWriteSrv, cpuLWriteSrv, cpuVIASrv;
wire cpuBufSel;
wire cpuBufAddr;
reg vidBufSel;
wire [13:0] cpuAddrShift = cpuAddr[14:1] - 14'h1380;
wire cpuBufRange;
// these are some helpful signals that shortcut the CPU buffer & VIA addresses
always_comb begin
/*if(cpuAddr[14:1] >= 14'h1380
&& cpuAddr[14:1] < 14'h3E40) cpuBufRange <= 1;
else cpuBufRange <= 0;*/
cpuBufRange <= (cpuAddr[14:1] >= 14'h1380) & (cpuAddr[14:1] < 14'h3E40);
if(!ncpuAS && !cpuRnW
&& !cpuAddr[23] && !cpuAddr[22] // first two bits always 0
&& !(cpuAddr[21] ^ ramSize[2]) // compare with RAM Size bits
&& !(cpuAddr[20] ^ ramSize[1])
&& !(cpuAddr[19] ^ ramSize[0])
&& cpuAddr[18] && cpuAddr[17] // next three bits always 1
&& cpuAddr[16] // skip 15, it selects buffers
&& cpuBufRange // only select buffer addresses
) begin
cpuBufAddr <= 1;
end else begin
cpuBufAddr <= 0;
end
cpuBufSel <= ~cpuAddr[15]; // address bit 15 selects buffer
if(cpuBufAddr && !ncpuUDS) cpuUWriteReq <= 1;
else cpuUWriteReq <= 0;
if(cpuBufAddr && !ncpuLDS) cpuLWriteReq <= 1;
else cpuLWriteReq <= 0;
// VIA is in address block $E8,0000 - $EF,FFFF
// VIA register select pins (RS[3:0]) are wired to cpuAddr[12:9]
// VIA Output Register A is selected when RS[3:0]==$F
/*if(!ncpuAS && !cpuRnW && !ncpuUDS
&& cpuAddr[23] && cpuAddr[22] // VIA Address Select
&& cpuAddr[21] && !cpuAddr[20]
&& cpuAddr[19]
&& cpuAddr[12] && cpuAddr[11] // VIA ORA
&& cpuAddr[10] && cpuAddr[9]
) cpuVIAReq <= 1;
else cpuVIAReq <= 0;*/
// Mac ROM addresses Data Register A as vBase+vBufA:
// $EF,E1FE + (512*15) = $EF,FFFE
// shift right by one because no A0 and we get $77,FFFF
// This bit is giving me hell, so let's expand it
if(ncpuAS==0 && cpuRnW==0 && ncpuUDS==0
&& cpuAddr == 22'h77FFFF) cpuVIAReq <= 1;
else cpuVIAReq <= 0;
end
// if there's an active CPU request and we've reached the state for servicing
// that CPU request, then set a flag to mark that we have serviced it
always @(posedge pixClk or posedge ncpuAS) begin
if(ncpuAS) begin
cpuUWriteSrv <= 0;
cpuLWriteSrv <= 0;
cpuVIASrv <= 0;
end else begin
if(ncpuAS) begin
cpuUWriteSrv <= 0;
cpuLWriteSrv <= 0;
cpuVIASrv <= 0;
end else begin
if(cpuUWriteReq && pState == S3) cpuUWriteSrv <= 1;
if(cpuLWriteReq && pState == S5) cpuLWriteSrv <= 1;
if(cpuVIAReq && pState == S7) cpuVIASrv <= 1;
end
end
end
// store the video buffer selection bit
always @(posedge pixClk or negedge nReset) begin
if(!nReset) vidBufSel <= 0;
// fine. no video buffer select. we use Main only.
//else if(pState == S7) vidBufSel <= ~cpuData[14];
end
endmodule