Skip to content

Commit 9579a14

Browse files
author
Matthias Koeppe
committed
Factored out a lot of functions into mz800gtk.c, mz800win.c, pckey.c,
and mz800vga.c, saving a million #ifdefs. Started GTK+ frontend.
1 parent d14b2ca commit 9579a14

File tree

6 files changed

+1714
-10
lines changed

6 files changed

+1714
-10
lines changed

Makefile

+22-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
VERSION=0.7.2
44

5+
FAST=1
6+
7+
#VIDEOFLAGS=-DHAVE_640X480X256
8+
59
ifdef FAST
610

711
# This will make the Z80 kernel faster, BUT you will lose speed
@@ -17,7 +21,8 @@ CFLAGS:=$(CFLAGS) -O9 -mpentium -march=pentium \
1721
-bi586-pc-linux-gnu \
1822
-fno-exceptions
1923
else
20-
CFLAGS:=$(CFLAGS) -O9 -m486 -Wall
24+
#CFLAGS:=$(CFLAGS) -O9 -mpentium -Wall
25+
CFLAGS:=$(CFLAGS) -Wall
2126
endif
2227

2328
PRINTFLAGS=-DPRINT_INVOKES_ENSCRIPT
@@ -27,7 +32,6 @@ Z80FLAGS=-DCOPY_BANKSWITCH -DHEAVY_LOAD -DSLOPPY_2 -DUSE_REGS \
2732
-DNO_COUNT_TSTATES -DRISKY_REGS -DWIN95PROOF \
2833
-DDELAYED_UPDATE -DTWO_Z80_COPIES $(PRINTFLAGS)
2934

30-
# -DVGA16
3135

3236
else
3337

@@ -60,7 +64,7 @@ ifdef DEBUG
6064
CFLAGS:=$(CFLAGS) -g
6165
endif
6266

63-
CFLAGS:=$(CFLAGS) -I. $(RAWKEYFLAGS) $(Z80FLAGS)
67+
CFLAGS:=$(CFLAGS) -I. $(INCLUDE) $(RAWKEYFLAGS) $(Z80FLAGS) $(VIDEOFLAGS)
6468

6569

6670
#### Targets ####
@@ -83,7 +87,11 @@ endif
8387

8488
MZ800EM_OBJS=$(Z80_OBJS) main.o disk.o graphics.o mzterm.o
8589

86-
MZ800WIN_OBJS=$(MZ800EM_OBJS) mz800win.o
90+
MZ800VGA_OBJS=$(MZ800EM_OBJS) mz800vga.o pckey.o
91+
92+
MZ800WIN_OBJS=$(MZ800EM_OBJS) mz800win.o pckey.o
93+
94+
MZ800GTK_OBJS=$(MZ800EM_OBJS) mz800gtk.o
8795

8896
.PHONY: all install clean tgz
8997

@@ -101,8 +109,16 @@ mzterm.o: mzterm.c mz800win.h
101109
main.o: main.c mz800win.h
102110
$(CC) -c $(CFLAGS) $< -o $@
103111

104-
mz800em: $(MZ800EM_OBJS)
105-
$(CC) $(CFLAGS) -o mz800em $(MZ800EM_OBJS) -lvga $(RAWKEYLIB) -lm
112+
GTKCFLAGS=`gtk-config --cflags`
113+
114+
mz800gtk.o: mz800gtk.c
115+
$(CC) -c $(CFLAGS) $(GTKCFLAGS) $< -o $@
116+
117+
mz800em: $(MZ800VGA_OBJS)
118+
$(CC) $(CFLAGS) -o $@ $(MZ800VGA_OBJS) -lvga $(RAWKEYLIB) -lm
119+
120+
gmz800em: $(MZ800GTK_OBJS)
121+
$(CC) $(CFLAGS) -o $@ $(MZ800GTK_OBJS) `gtk-config --libs`
106122

107123
mz800em.exe: $(MZ800WIN_OBJS)
108124
$(CC) $(CFLAGS) -o mz800em.exe $(MZ800WIN_OBJS) -lm -mwindows

README

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ system, also available for Windows-32 systems.
33

44
Z80 emulation from `xz80', copyright (C) 1994 Ian Collier.
55
MZ700 support and VGA front-end (C) 1996 Russell Marks.
6-
MZ800 support and Windows-32 port are copr. 1998,1999 Matthias Koeppe
6+
GTK+ front-end taken from nc100em-1.2, which is copr. 1999 Russell Marks.
7+
MZ800 support and Windows-32 port are copr. 1998,1999,2002 Matthias Koeppe
78
89

910
This program is free software; you can redistribute it and/or modify

TODO

-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ Cygwin: Add proper timing. Fix palette problem. Let the process pause
2828
if window is not active, or if it is waiting for mzterm-ish keyboard
2929
input.
3030

31-
GNU/Linux: Finish the `VGA16' mode of doing graphics; this should
32-
improve speed on my slow VGA computer, especially in 640x200 mode.
33-
3431
Add support for the SHARP MZ-900 series, a Z80 machine running at
3532
12MHz, compatible with the MZ-800 series, but featuring 2 pages of
3633
640x200 graphics at 16 colors (4 planes), mapped at addresses

0 commit comments

Comments
 (0)