Compare commits

...

17 Commits
v0.1.0 ... main

Author SHA1 Message Date
techav 4302d72405 Cleanup old logic 2021-10-22 22:37:15 -05:00
techav fca75c2c4c Update readme 2021-10-22 22:36:03 -05:00
techav 42f59513e1
Merge pull request #1 from techav-homebrew/XGA
Xga
2021-10-22 22:24:59 -05:00
techav a9b119fb6d Mostly working 2021-10-22 22:18:44 -05:00
techav 1137244a39 Rewrite again 2021-10-17 03:41:04 -05:00
techav-homebrew 3c12b07c70 Another fresh start 2021-10-17 01:25:27 -05:00
techav 7e2413150f Cleanup 2021-10-17 01:24:22 -05:00
techav 4be7d63105 Fixed image overwrite issues 2021-10-12 23:28:59 -05:00
techav 5377d05895 Rebuilt state machine again 2021-10-11 21:25:28 -05:00
techav 6f2f67ef05 New State Machine 2021-10-11 16:25:40 -05:00
techav 373b0ec9b5 Debugging VRAM Write Timing 2021-10-09 14:47:53 -05:00
techav-homebrew 97b0b72794 VIA snooping 2021-10-07 21:35:29 -05:00
techav-homebrew 3669e3a66b CPU Snoop First Draft 2021-10-07 21:17:36 -05:00
techav 90d5384b90 Starting new cpu snoop 2021-10-07 18:54:47 -05:00
techav 4f08c1f6fc Start logic rebuild for XGA
Ground-up rewrite of the video timing and output logic for XGA. Much simpler than the initial VGA logic. First draft, incomplete.
2021-08-04 23:40:16 -05:00
techav c4b11b0a4b Change multiplier part
Changed 512MLF to 511MLF due to EOL
2021-07-26 22:23:40 -05:00
techav 51da925261 XGA Board Rev
Rework of board to add support for pixel-doubled image on XGA resolution frame, and installation in Plus or 512k
2021-07-25 18:11:49 -05:00
23 changed files with 92478 additions and 61131 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,28 +1,32 @@
# 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). Tested and working on a Mac SE and a Mac Plus, both with 4MB of RAM.
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
The Mac SE primary framebuffer starts at 0x5900 below the top of RAM. Since it's not in a static location for every system, the system's memory configuration is needed. This is set by three ramSize jumpers, which mask CPU address bits 21, 20, 19. Not all possible ramSize selections are valid memory sizes when using 30-pin SIMMs in the Mac SE. In theory, these combinations could be possible when using PDS memory expansion cards, but this is unlikely. The chart below indicates the valid & invalid ramSize configurations and the corresponding installed SIMM combinations.
The Mac primary framebuffer starts at 0x5900 below the top of RAM. Since it's not in a static location for every system, the system's memory configuration is needed. This is set by three ramSize jumpers, which mask CPU address bits 21, 20, 19. Not all possible ramSize selections are valid memory sizes when using 30-pin SIMMs in the Mac SE. In theory, these combinations could be possible when using PDS memory expansion cards, but this is unlikely. The chart below indicates the valid & invalid ramSize configurations and the corresponding installed SIMM combinations.
|ramSize|Main Framebuffer|Alt Framebuffer|RAM Top Address + 1|RAM Size|Installed SIMMs |
|:-----:|:--------------:|:-------------:|:-----------------:|:------:|------------------------------|
@ -36,7 +40,6 @@ The Mac SE primary framebuffer starts at 0x5900 below the top of RAM. Since it's
| 000 | 0x07a700 | 0x072700 | 0x080000 | 0.5MB | `[256kB 256kB][ --- --- ]` |
## CPLD Pin Assignments
Logic uses nearly all available resources in the CPLD (104 of 128 macrocells).
|signal|Direction|Pin|
|---|---|---|
@ -124,11 +127,10 @@ 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.
The resistor footprints are too small for 1/4W parts. Might work with 1/8W parts.
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.
- ~~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.~~ 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.~~
- The ninth vertical line is missing from the output image, and there is a black line two pixels from the right side of the screen.
- There is still a timing issue with VRAM writes. Some writes seem to get missed.
- Additional decoupling is needed when using the board in 512k/Plus Macs. Without decoupling on every VCC pin of the CPLD and decoupling for the 68000 CPU, overall system stability is severely impacted.
- Support for alternate frame buffer is currently disabled.

BIN
SE-VGA_Schematic.pdf Normal file

Binary file not shown.

View File

@ -1,245 +0,0 @@
/******************************************************************************
* SE-VGA
* CPU Bus Snoop
* techav
* 2021-04-06
******************************************************************************
* Watches for writes to frame buffer memory addresses and copies that data
* into VRAM
*****************************************************************************/
module cpusnoop (
input wire nReset, // System Reset signal
input wire pixClock, // 25.175MHz Pixel Clock
input logic [2:0] seq, // Sequence count (low 3 bits of hCount)
input logic [22:0] 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 wire cpuClk, // CPU Clock
output logic [14:0] vramAddr, // VRAM Address Bus
output logic [7:0] vramDataOut,// VRAM Data Bus Output
output wire nvramWE, // VRAM Write strobe
output wire nvramCE0, // VRAM Main select
output wire nvramCE1, // VRAM Alt select
output wire vidBufSelOut,// VRAM Video Buffer selection
input logic [2:0] ramSize // CPU RAM size selection
);
wire pendWriteLo; // low byte write to VRAM pending
wire pendWriteHi; // high byte write to VRAM pending
logic [13:0] addrCache; // store address for cpu writes to framebuffer
logic [7:0] dataCacheLo; // store data for cpu writes to low byte
logic [7:0] dataCacheHi; // store data for cpu writes to high byte
wire cpuBufSel; // is CPU accessing frame buffer?
logic [2:0] cycleState; // state machine state
reg cpuCycleEnded; // mark cpu has ended its cycle
reg cpuCycleBufSel; // which frame buffer was selected for the cpu cycle
reg vidBufSel; // which frame buffer was selected for video output
// define state machine states
parameter
S0 = 0,
S1 = 1,
S2 = 2,
S3 = 3,
S4 = 4,
S5 = 5;
// when cpu addresses the framebuffer, set our enable signal
/* 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][ --- --- ]
*/
always_comb begin
// remember cpuAddr is shifted right by one since 68000 does not output A0
if(cpuAddr[22:21] == 2'b00 // initial constant
&& ramSize == cpuAddr[20:18] // ram size selection
&& cpuAddr[17:15] == 3'b111 // trailing constant
// next bit is main/alt select
&& (cpuAddr[13:0] >= 14'h1380 // bottom of buffer range (0x2700>>1)
&& cpuAddr[13:0] <= 14'h3e3f) // top of buffer range (0x7C70>>1)
) begin
cpuBufSel <= 1'b1;
end else begin
cpuBufSel <= 1'b0;
end
end
// keep an eye out for cpu ending its cycle
always @(negedge pixClock or negedge nReset) begin
if(!nReset) cpuCycleEnded <= 0;
else if(cycleState == S2) cpuCycleEnded <= 0;
else if(ncpuUDS && ncpuLDS
&& (cycleState == S3
|| cycleState == S4
|| cycleState == S5
|| cycleState == S1)
) begin
cpuCycleEnded <= 1;
end else cpuCycleEnded <= cpuCycleEnded;
end
// CPU Write to VRAM state machine
always @(negedge pixClock or negedge nReset) begin
if(!nReset) begin
cycleState <= S0;
pendWriteHi <= 0;
pendWriteLo <= 0;
addrCache <= 0;
dataCacheHi <= 0;
dataCacheLo <= 0;
end else begin
case (cycleState)
S0 : begin
// idle state, wait for valid address and ncpuAS asserted
if(ncpuAS == 0
&& cpuBufSel == 1
&& cpuRnW == 0
&& (ncpuLDS == 0
|| ncpuUDS == 0)) begin
pendWriteHi <= !ncpuUDS;
pendWriteLo <= !ncpuLDS;
dataCacheHi <= cpuData[15:8];
dataCacheLo <= cpuData[7:0];
// Valid CPU-VRAM cycle, so subtract constant $1380 from the
// cpu address and store the result in addrCache register.
// Constant $1380 corresponds to $2700 shifted right by 1.
// Once the selection bits above are masked out, we're left
// with buffer addresses starting at $2700
// e.g. with 4MB of RAM, fram buffer starts at $3FA700
// buffer address: 0011 1111 1010 0111 0000 0000 = $3FA700
// vram addr mask: 0000 0000 0011 1111 1111 1111 - $003FFF
// vram address: 0000 0000 0010 0111 0000 0000 = $002700
// Since CPU is 16-bit and does not provide A0, our cpuAddr
// signals are shifted right by one, so we need to do the same
// to our offset before subtracting it from cpuAddr
// offset: 0000 0000 0010 0111 0000 0000 = $002700
// shifted offset: 0000 0000 0001 0011 1000 0000 = $001380
addrCache <= cpuAddr[13:0] - 14'h1380;
// The next address bit selects which frame buffer the CPU
// is writing to for this cycle. 1 = Main ; 0 = Alt
// Invert & save for later
cpuCycleBufSel <= !cpuAddr[14];
cycleState <= S2;
end else if(ncpuAS == 0
&& cpuRnW == 0
&& ncpuUDS == 0
&& cpuAddr[22:18] == 5'h1D
&& cpuAddr[11:7] == 5'h1F) begin
// the CPU is addressing VIA Port A. We need to check what
// bit 6 is set to to determine which buffer is selected
// for video output. 1 = Main ; 0 = Alt
vidBufSel <= !cpuData[14];
// now that we've saved the buffer selection, go to state
// S5 to wait for the CPU to end the bus cycle.
cycleState <= S5;
end else begin
cycleState <= S0;
end
end
S2 : begin
// wait for sequence
if(pendWriteLo && !seq[0]) cycleState <= S3;
else if (pendWriteHi && !seq[0]) cycleState <= S4;
else if (!pendWriteHi && !pendWriteLo) cycleState <= S0; // in case something weird happens
else cycleState <= S2;
end
S3 : begin
// write CPU low byte to VRAM
if (seq == 0) begin
cycleState <= S3; // we shouldn't be here during a read cycle, so delay
end else if(pendWriteHi == 1) begin
cycleState <= S1; // move on to delay before second write cycle
end else begin
cycleState <= S5;
end
pendWriteLo <= 0;
end
S4 : begin
// write CPU high byte to VRAM
if (seq == 0) begin
cycleState <= S4; // we shouldn't be here during a read cycle, so delay
end else begin
cycleState <= S5;
end
pendWriteHi <= 0;
end
S5 : begin
// wait for CPU to negate both ncpuUDS and ncpuLDS
if(cpuCycleEnded == 1) begin
cycleState <= S0;
end else begin
cycleState <= S5;
end
end
S1 : begin
// delay moving to second write cycle
if (!seq[0]) cycleState <= S4;
else cycleState <= S1;
end
default: begin
// how did we end up here? reset to S0
cycleState <= S0;
end
endcase
end
end
always_comb begin
// output VRAM address
// we actually do an endian swap here assigning the low-order bit of
// the VRAM address because the video shift register in the SE loads
// a full 16-bit word and shifts out starting with the MSB.
// An endian swap here ensures that when we load the VRAM for output
// the bits are in the right order.
vramAddr[14:1] <= addrCache[13:0];
if(cycleState == S4) begin
vramAddr[0] <= 0;
end else begin
vramAddr[0] <= 1;
end
// Assert VRAM Write signal during CPU Cycle states S3 & S4
// Also assert VRAM chip enable signals based on which buffer the CPU
// addressed for the VRAM write cycle
if(seq != 0 && (cycleState == S3 || cycleState == S4)) begin
nvramWE <= 0;
nvramCE0 <= cpuCycleBufSel;
nvramCE1 <= !cpuCycleBufSel;
end else begin
nvramWE <= 1;
nvramCE0 <= 1;
nvramCE1 <= 1;
end
// Output our internal data cache registers on CPU Cycle states S3 & S4
// Otherwise, just output 0. This will be muxed for the VRAM data bus
// in the next module outside of here.
if(cycleState == S3) begin
vramDataOut <= dataCacheLo;
end else if(cycleState == S4) begin
vramDataOut <= dataCacheHi;
end else begin
vramDataOut <= 0;
end
end
assign vidBufSelOut = vidBufSel;
endmodule

124
se-vga.sv
View File

@ -1,124 +0,0 @@
/******************************************************************************
* SE-VGA
* Top-level module
* techav
* 2021-04-06
******************************************************************************
* Pulls together all the smaller modules to form the SE-VGA adapter
*****************************************************************************/
module sevga (
input wire nReset, // System reset signal
input wire pixClk, // 25.175MHz 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
);
logic [9:0] hCount;
logic [9:0] vCount;
wire hActive;
wire hSEActive;
wire vActive;
wire vSEActive;
wire nvramWEpre; // VRAM Write signal from cpu snoop
wire nvramCE0pre;
wire nvramCE1pre;
wire vidBufSel;
logic [14:0] vidVramAddr;
logic [14:0] cpuVramAddr;
logic [7:0] vidVramData;
wire [7:0] cpuVramData;
// link module that generates all our timing signals
vgagen vgatiming(
.nReset(nReset),
.pixClk(pixClk),
.hCount(hCount),
.hActive(hActive),
.hSEActive(hSEActive),
.nhSync(nhSync),
.vCount(vCount),
.vActive(vActive),
.vSEActive(vSEActive),
.nvSync(nvSync)
);
// link module that fetches & outputs video data
vgaout vidvram(
.pixClock(pixClk),
.nReset(nReset),
.hCount(hCount),
.vCount(vCount),
.hSEActive(hSEActive),
.vSEActive(vSEActive),
.vramData(vidVramData),
.vramAddr(vidVramAddr),
.nvramOE(nvramOE),
.vidOut(vidOut)
);
// link module that snoops cpu writes
cpusnoop cpusnp(
.nReset(nReset),
.pixClock(pixClk),
.seq(hCount[2:0]),
.cpuAddr(cpuAddr),
.cpuData(cpuData),
.ncpuAS(ncpuAS),
.ncpuUDS(ncpuUDS),
.ncpuLDS(ncpuLDS),
.cpuRnW(cpuRnW),
.cpuClk(cpuClk),
.vramAddr(cpuVramAddr),
.vramDataOut(cpuVramData),
.nvramWE(nvramWEpre),
.nvramCE0(nvramCE0pre),
.nvramCE1(nvramCE1pre),
.vidBufSelOut(vidBufSel),
.ramSize(ramSize)
);
always_comb begin
// vramAddr muxing
if(nvramWEpre == 1'b0) begin
vramAddr <= cpuVramAddr;
end else if(nvramOE == 0) begin
vramAddr <= vidVramAddr;
end else begin
vramAddr <= 0;
end
end
always_comb begin
if(nvramWEpre == 1'b0) begin
vramData <= cpuVramData;
end else begin
vramData <= 8'bZZZZZZZZ;
end
vidVramData <= vramData;
end
assign nvramCE0 = (nvramWEpre | nvramCE0pre) & (nvramOE | vidBufSel);
assign nvramCE1 = (nvramWEpre | nvramCE1pre) & (nvramOE | ~vidBufSel);
//assign nvramWE = nvramWEpre | pixClk;
assign nvramWE = nvramWEpre;
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

3971
sevga.vwf

File diff suppressed because it is too large Load Diff

View File

@ -1,74 +0,0 @@
/******************************************************************************
* SE-VGA
* VGA signal counter
* techav
* 2021-04-06
******************************************************************************
* Low-level VGA signal counter
*****************************************************************************/
`ifndef VGACOUNT
`define VGACOUNT
module vgacount (
input wire nReset, // system reset signal
input wire clock, // counter increment clock
output logic [9:0] count, // count output
output wire nSync, // sync pulse
output wire activeVid, // active video signal
output wire activeSE // secondary active video signal (SE)
);
parameter COUNTMAX=800, // Total dot count per line or line count per frame
SYNCBEGIN=592, // Dot/Line count where sync pulse begins
SYNCEND=688, // Dot/Line count +1 where sync pulse ends
ACTBEGIN=576, // Dot/Line count where VGA active video begins
ACTEND=736, // Dot/Line count +1 where VGA active video ends
SEACTBEGIN=512; // Dot/Line count +1 where SE video window ends
logic [9:0] counter;
// primary counter
always @(negedge clock or negedge nReset) begin
if(nReset == 1'b0) begin
counter <= 10'h0;
end else begin
if (counter < COUNTMAX) begin
counter <= counter + 10'h1;
end else begin
counter <= 10'h0;
end
end
end
// combinatorial logic derived from the counters
always_comb begin
// output the count signals
count <= counter;
// Sync pulse
if(count >= SYNCBEGIN && count < SYNCEND) begin
nSync <= 1'b0;
end else begin
nSync <= 1'b1;
end
// VGA active video range
if(count >= ACTBEGIN && count < ACTEND) begin
activeVid <= 1'b0;
end else begin
activeVid <= 1'b1;
end
// SE active video window within VGA active video range
if(count >= SEACTBEGIN) begin
activeSE <= 1'b0;
end else begin
activeSE <= 1'b1;
end
end
endmodule
`endif

View File

@ -1,35 +0,0 @@
/******************************************************************************
* SE-VGA
* VGA timing generator
* techav
* 2021-04-06
******************************************************************************
* Generates VGA timing signals & counters
*****************************************************************************/
`ifndef VGAGEN
`define VGAGEN
`include "vgacount.sv"
module vgagen (
input wire nReset, // master reset signal
input wire pixClk, // 25.175MHz pixel clock
output logic [9:0] hCount, // horizontal pixel count
output wire hActive, // horizontal VGA active video signal
output wire hSEActive, // horizontal SE active video signal
output wire nhSync, // horizontal sync pulse signal
output logic [9:0] vCount, // vertical line count
output wire vActive, // vertical VGA active video signal
output wire vSEActive, // vertical SE active video signal
output wire nvSync // vertical sync pulse signal
);
// Generate horizontal signal timing
vgacount #(800,592,688,576,736,512) hoz(nReset,pixClk,hCount,nhSync,hActive,hSEActive);
// Generate vertical signal timing
vgacount #(525,421,423,411,456,342) ver(nReset,nhSync,vCount,nvSync,vActive,vSEActive);
endmodule
`endif

View File

@ -1,68 +0,0 @@
/******************************************************************************
* SE-VGA
* VGA video output
* techav
* 2021-04-06
******************************************************************************
* Fetches video data from VRAM and shifts out
*****************************************************************************/
`include "vgashiftout.sv"
module vgaout (
input wire pixClock,
input wire nReset,
input logic [9:0] hCount,
input logic [9:0] vCount,
input wire hSEActive,
input wire vSEActive,
input logic [7:0] vramData,
output logic [14:0] vramAddr,
output wire nvramOE,
output wire vidOut
);
wire vidMuxOut; // pixel data shift out
wire vidActive; // combined active video signal
wire nVidLoad; // Load VRAM data into shifter
vgaShiftOut vOut(
.nReset(nReset),
.clk(pixClock),
.nLoad(nVidLoad),
.parIn(vramData),
.out(vidMuxOut)
);
always_comb begin
if(hCount[2:0] == 0) nVidLoad <= 0;
else nVidLoad <= 1;
// combined video active signal
if(hSEActive == 1'b1 && vSEActive == 1'b1) begin
vidActive <= 1'b1;
end else begin
vidActive <= 1'b0;
end
// video data output
if(vidActive == 1'b1) begin
vidOut <= ~vidMuxOut;
end else begin
vidOut <= 1'b0;
end
// vram read signal
if(vidActive == 1'b1 && hCount[2:0] == 0) begin
nvramOE <= 1'b0;
end else begin
nvramOE <= 1'b1;
end
// vram address signals
// these will be mux'd with cpu addresses externally
vramAddr[14:6] <= vCount[8:0];
vramAddr[5:0] <= hCount[8:3];
end
endmodule

View File

@ -1,84 +0,0 @@
/******************************************************************************
* SE-VGA
* VGA Shift Out
* techav
* 2021-04-06
******************************************************************************
* 2-stage shift register for storing & shifting out pixel data
*****************************************************************************/
`ifndef VGASHIFTOUT
`define VGASHIFTOUT
module vgaShiftOut (
input wire nReset, clk, nLoad,
input logic [7:0] parIn,
output wire out
);
reg [8:0] shiftReg;
always @(negedge clk or negedge nReset) begin
if(!nReset) shiftReg <= 0;
else begin
if(!nLoad) begin
shiftReg[8] <= shiftReg[7];
shiftReg[7:0] <= parIn;
end else begin
shiftReg[8:1] <= shiftReg[7:0];
shiftReg[0] <= 0;
end
end
end
assign out = shiftReg[8];
endmodule
/*
module vgaShiftOut (
input wire nReset,
input wire clk,
input wire shiftEn,
input wire nLoad1,
input wire nLoad2,
input logic [7:0] parIn,
output wire out
);
reg [7:0] inReg;
reg [7:0] outReg;
// load data into first stage register on rising edge of pixel clock
// if nLoad1 is asserted
always @(posedge clk or negedge nReset) begin
if(!nReset) inReg <= 0;
else if(!nLoad1) inReg <= parIn;
end
// load data into second stage register on falling edge of pixel clock
// if nLoad2 is asserted, otherwise if shiftEn is asserted, then shift
// video data out. Shift in 0 to fill empty registers
always @(negedge clk or negedge nReset) begin
if(!nReset) outReg <= 0;
else begin
if(!nLoad2) outReg <= inReg;
else if(shiftEn) begin
outReg[7] <= outReg[6];
outReg[6] <= outReg[5];
outReg[5] <= outReg[4];
outReg[4] <= outReg[3];
outReg[3] <= outReg[2];
outReg[2] <= outReg[1];
outReg[1] <= outReg[0];
outReg[0] <= 0;
end
end
end
// high-order bit of the shift register (second stage) is the serial output
assign out = outReg[7];
endmodule
*/
`endif

View File

@ -1,75 +0,0 @@
/******************************************************************************
* SE-VGA
* VGA Output Test
* techav
* 2021-05-14
******************************************************************************
* Test configuration for testily testing testy test hardware.
* This is not a part of the actual configuration. It is a separate top-level
* entity for testing modules and hardware. Outputs a 512x342 pixel window of
* alternating black and white pixels in a 640x480 resolution screen.
*****************************************************************************/
// all the same I's and O's as our proper configuration
module vgatest (
input wire nReset, // System reset signal
input wire pixClk, // 25.175MHz 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
input logic [7:0] vramData,
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
output logic [15:0] cpuData,
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
);
logic [9:0] hCount, vCount;
wire hActive, hSEActive;
wire vActive, vSEActive;
vgagen vgatiming(
.nReset(nReset),
.pixClk(pixClk),
.hCount(hCount),
.hActive(hActive),
.hSEActive(hSEActive),
.nhSync(nhSync),
.vCount(vCount),
.vActive(vActive),
.vSEActive(vSEActive),
.nvSync(nvSync)
);
reg outTog;
always @(negedge pixClk or negedge nReset) begin
if(nReset == 0) begin
outTog <= 0;
end else begin
outTog <= !outTog;
end
end
assign vidOut = outTog & hSEActive & vSEActive;
assign vramAddr = 0;
assign nvramOE = 1;
assign nvramWE = 1;
assign nvramCE0 = 1;
assign nvramCE1 = 1;
assign cpuData[7:0] = ~vramData;
assign cpuData[15:8] = vramData;
endmodule