Coprolite.com
Google
 
Web Coprolite.com
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Microcontrollers | Graphics | Z-80 | FreeDOS | Electronics | Odyssey 2 | 8048 | Other/Msc.

Last 30 Days | Last 60 Days | Last 90 Days | All Articles/Links


Categories:
·GNU/Linux
·Homebrew Designs
·Perl
·Microcontrollers
·Graphics
·Z-80
·FreeDOS
·Other/Msc.
·Electronics
·8048
·All Categories
·Other SignalQ Websites




Z-80 Homebrew Computer - Interfacing with a Pentium and GNU/Linux
Topic: Z-80   Posted:2003-07-06
Printer Friendly: Print

spacerspacer
There are 12 parts to this article:
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 < 9 - 10 - 11 - 12

For details on the getdump and putprog programs, see this article. In this article, I'll detail the software needed to hook the homebrew up to a Pentium 133 PC with a uClibc GIAGD based GNU/Linux system as the OS. This software should compile just fine with GCC/Glibc as well. Note that it is specific to Intel hardware.

Here is the source for getdump.

Here is the binary for getdump.

I mode some minor tweaks from the program in this article. The trickier part is replacing the gwbasic program with something more tolerable. I made binaries that can be run with Perl as system calls:

Here is the binary for out378.

Here is the binary for out37a.

Here is the source for out378.

Here is the source for out37a.

Here is the source for putprog.pl.

Out378:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <asm/io.h>
int main(int argc, char *argv[])
{
unsigned int hextowrite;
ioperm(0x378,1,1);
sscanf(argv[1],"%x",&hextowrite);       
outb(hextowrite,0x378);
return 0;
}

Out37a:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <asm/io.h>
int main(int argc, char *argv[])
{
unsigned int hextowrite;
ioperm(0x37a,1,1);
sscanf(argv[1],"%x",&hextowrite);       
outb(hextowrite,0x37a);
return 0;
}

These are used in putprog.pl:

@progdata=(62,254,8,33,48,24,126,211,1,8,211,0,7, 8,62,255,211
,0,44,125,254,56,202,32,24,195,6,24,0,0,0,0,118,0,24,
0,0,0,0,0,0,0,0,0,0,0,0,0,140,175,163,144,127,191,191,249);
system("./out37a 8");
printf("Waiting?");
$response=<STDIN>;
system("./out37a 8"); 
foreach $curdata (@progdata){
$curdatahex=sprintf("%x",$curdata);
system("./out378 $curdatahex");
&delay;
system("./out37a 0");
&delay;
system("./out37a 8");
}
for ($fill=1;$fill<256;$fill++){
system("./out378 0");
&delay;
system("./out37a 0"); 
&delay;
system("./out37a 8"); 
&delay; 
}
sub delay {
for($i=1;$i<2000;$i++){}
}  

I had to compile Perl for the uClibc/GIAGD system:

Here is the perl binary. Note that this will only work with uClibc systems.

Here is the perl source.




Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. Coprolite.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 Coprolite.com

Created by:
MCJ
MCJ CMS