Previous 15994 Revisions Next

r1428 Saturday 22nd December, 2007 at 05:14:26 UTC by Dirk Best
Fixed some svn properties
[hash]gamecom.hsi
[src/mess/drivers]bbcbc.c
[src/mess/machine]74145.c 74145.h
[src/mess/tools/dat2html]dat2html.mak

hash/gamecom.hsi
r1427r1428
1<hashfile>
2   <!-- This MESS HASH file was auto-generated from Cowering's GoodGCOM database (V3.14)  -->
3   <!-- for the exclusive use of MESS.  Keep this notice intact if editing this file  -->
4 
5   <hash crc32="b336e530" sha1="066d5cddce9729044ad598ad3cc3489a834f5197" name="Batman and Robin">
6      <year>1997</year>
7      <manufacturer>Product # 71-709</manufacturer>
8   </hash>
9   <hash crc32="1a041ff0" sha1="b3d50e0cca6e2a539fba5883854aaf26424ab382" name="Centipede">
10      <year>1999</year>
11      <manufacturer>Product # 71-755</manufacturer>
12   </hash>
13   <hash crc32="884568d1" sha1="9aaa1cf3b12f14201079dfbdd4c17fe868972de6" name="Duke Nukem 3D">
14      <year>1997</year>
15      <manufacturer>Product # 71-712</manufacturer>
16   </hash>
17   <hash crc32="0142a7a2" sha1="f0ce0c92079baaa8e1fc757593ebd1a27949d1cc" name="Fighters MegaMix">
18      <status>Known Bad Image</status>
19      <year>1998</year>
20      <manufacturer>Product # 71-739</manufacturer>
21   </hash>
22   <hash crc32="061e943f" sha1="c165e5f4b61341ae0e8a4d141b28e18108942326" name="Fighters MegaMix">
23      <year>1998</year>
24      <manufacturer>Product # 71-739</manufacturer>
25   </hash>
26   <hash crc32="10e4c5cd" sha1="8224d3e71a3da2f4029bee8b62b4a0c108c054e4" name="Frogger">
27      <year>1999</year>
28      <manufacturer>Product # 71-756</manufacturer>
29   </hash>
30   <hash crc32="e235a589" sha1="97f782e72d738f4d7b861363266bf46b438d9b50" name="Game.com External BIOS">
31      <status>GoodGCOM Verified Image</status>
32      <year>1997</year>
33      <manufacturer>Product # 71-516</manufacturer>
34   </hash>
35   <hash crc32="c1031233" sha1="7a0165c4fb2ab0b8ba0e5c810f8f6f672a45bcf3" name="Game.com External BIOS">
36      <year>1997</year>
37      <manufacturer>Product # 71-516</manufacturer>
38   </hash>
39   <hash crc32="a0cec361" sha1="03368237e8fed4a8724f3b4a1596cf4b17c96d33" name="Game.com Internal BIOS">
40      <year>1997</year>
41      <manufacturer>Product # 71-516</manufacturer>
42   </hash>
43   <hash crc32="7e721a84" sha1="4c6b5b91a70397cb5e1add4ab53afe3ec0fe2072" name="Game.com Internet">
44      <year>1997</year>
45      <manufacturer>Product # 71-529</manufacturer>
46   </hash>
47   <hash crc32="75d3c8d8" sha1="b72a03af1dec0c621f9eda89ded3845724bb34ac" name="Henry">
48      <year>1997</year>
49      <manufacturer>Product # 71-728</manufacturer>
50   </hash>
51   <hash crc32="845ed281" sha1="117bfa1c831fbcf4a1d507cb70b6e0636c29bbd3" name="Indy 500">
52      <year>1997</year>
53      <manufacturer>Product # 71-525</manufacturer>
54   </hash>
55   <hash crc32="8c512912" sha1="c60ac5e59c3cc092506bc47adb60b40a9415bc97" name="Jeopardy!">
56      <year>1998</year>
57      <manufacturer>Product # 71-726</manufacturer>
58   </hash>
59   <hash crc32="496efa62" sha1="1d91b616caa2d35f53ec5680aada8f75e2f0ac43" name="Lights Out">
60      <year>1997</year>
61      <manufacturer>Product # 71-735</manufacturer>
62   </hash>
63   <hash crc32="b422c5f8" sha1="648badcac6c386d7ff40f917e34bd309e737c027" name="Lost World, The - Jurassic Park">
64      <year>1997</year>
65      <manufacturer>Product # 71-704</manufacturer>
66   </hash>
67   <hash crc32="d6a65a07" sha1="8057144f6995eafff6d893383114b48f4c77abc3" name="Monopoly">
68      <status>GoodGCOM Verified Image</status>
69      <year>1999</year>
70      <manufacturer>Product # 71-752</manufacturer>
71   </hash>
72   <hash crc32="bd29c844" sha1="a560ad2b916a9e4ace917d7e707cdcafbffe6e66" name="Mortal Kombat Trilogy">
73      <status>Known Bad Image</status>
74      <year>1997</year>
75      <manufacturer>Product # 71-711</manufacturer>
76   </hash>
77   <hash crc32="72893a77" sha1="d8a403a180f4a397098c8a598dd6cd5b45ef377a" name="Mortal Kombat Trilogy">
78      <year>1997</year>
79      <manufacturer>Product # 71-711</manufacturer>
80   </hash>
81   <hash crc32="0e018f6a" sha1="c9c4435bdcea2b9ddaa2768f28f286abd382608d" name="Quiz Wiz - Cyber Trivia">
82      <year>1997</year>
83      <manufacturer>Product # 71-524</manufacturer>
84   </hash>
85   <hash crc32="0984c7f5" sha1="e32357d08b07a6a8f6a7e64205cca35e50225269" name="Resident Evil 2">
86      <status>Known Bad Image</status>
87      <year>1998</year>
88      <manufacturer>Product # 71-745</manufacturer>
89   </hash>
90   <hash crc32="4f09457d" sha1="1d4d4ff13c8f7c228f30bddab174d4781b370ec9" name="Resident Evil 2">
91      <year>1998</year>
92      <manufacturer>Product # 71-745</manufacturer>
93   </hash>
94   <hash crc32="4d4ad909" sha1="2735d59964fe7c1d43bd260df86b9dfbc1bfd736" name="Scrabble">
95      <year>1999</year>
96      <manufacturer>Product # 71-754</manufacturer>
97   </hash>
98   <hash crc32="8c165064" sha1="80c693f3ae285bd84ba1fc4762bdee2676493096" name="Sonic Jam">
99      <status>Known Bad Image</status>
100      <year>1998</year>
101      <manufacturer>Product # 71-734</manufacturer>
102   </hash>
103   <hash crc32="8b4a63f9" sha1="393a98138c8825ed61990e1b15e1967f87068ac6" name="Sonic Jam">
104      <year>1998</year>
105      <manufacturer>Product # 71-734</manufacturer>
106   </hash>
107   <hash crc32="e7fb8fd9" sha1="3620491b531b9fce67545e822eff2f99c1adb4a4" name="Tiger Casino">
108      <status>Known Bad Image</status>
109      <year>1998</year>
110      <manufacturer>Product # 71-731</manufacturer>
111   </hash>
112   <hash crc32="ba698142" sha1="32ce1be96f7f367b8a0adb8cc61a8cca7d6b79dd" name="Tiger Casino">
113      <year>1998</year>
114      <manufacturer>Product # 71-731</manufacturer>
115   </hash>
116   <hash crc32="4c13e65b" sha1="d4e08fc050c006ed6c1a177a1f4c41b4a68c26bb" name="Tiger Web Link">
117      <year>1997</year>
118      <manufacturer>Product # 71-747</manufacturer>
119   </hash>
120   <hash crc32="048347a0" sha1="298c2b87754dd93481feea1d9e01585a1e269770" name="Wheel of Fortune">
121      <year>1997</year>
122      <manufacturer>Product # 71-523</manufacturer>
123   </hash>
124   <hash crc32="b91e2e32" sha1="30ddd349b8bdc21ef7ada4772ab1f3a9318ab0c8" name="Wheel of Fortune 2">
125      <status>GoodGCOM Verified Image</status>
126      <year>1998</year>
127      <manufacturer>Product # 71-527</manufacturer>
128   </hash>
129   <hash crc32="f894065d" sha1="5e2164fa76546b2795af7b04a766e31784b82eca" name="Williams Arcade Classics">
130      <year>1997</year>
131      <manufacturer>Product # 71-722</manufacturer>
132   </hash>
133</hashfile>
1<hashfile>
2   <!-- This MESS HASH file was auto-generated from Cowering's GoodGCOM database (V3.14)  -->
3   <!-- for the exclusive use of MESS.  Keep this notice intact if editing this file  -->
4
5   <hash crc32="b336e530" sha1="066d5cddce9729044ad598ad3cc3489a834f5197" name="Batman and Robin">
6      <year>1997</year>
7      <manufacturer>Product # 71-709</manufacturer>
8   </hash>
9   <hash crc32="1a041ff0" sha1="b3d50e0cca6e2a539fba5883854aaf26424ab382" name="Centipede">
10      <year>1999</year>
11      <manufacturer>Product # 71-755</manufacturer>
12   </hash>
13   <hash crc32="884568d1" sha1="9aaa1cf3b12f14201079dfbdd4c17fe868972de6" name="Duke Nukem 3D">
14      <year>1997</year>
15      <manufacturer>Product # 71-712</manufacturer>
16   </hash>
17   <hash crc32="0142a7a2" sha1="f0ce0c92079baaa8e1fc757593ebd1a27949d1cc" name="Fighters MegaMix">
18      <status>Known Bad Image</status>
19      <year>1998</year>
20      <manufacturer>Product # 71-739</manufacturer>
21   </hash>
22   <hash crc32="061e943f" sha1="c165e5f4b61341ae0e8a4d141b28e18108942326" name="Fighters MegaMix">
23      <year>1998</year>
24      <manufacturer>Product # 71-739</manufacturer>
25   </hash>
26   <hash crc32="10e4c5cd" sha1="8224d3e71a3da2f4029bee8b62b4a0c108c054e4" name="Frogger">
27      <year>1999</year>
28      <manufacturer>Product # 71-756</manufacturer>
29   </hash>
30   <hash crc32="e235a589" sha1="97f782e72d738f4d7b861363266bf46b438d9b50" name="Game.com External BIOS">
31      <status>GoodGCOM Verified Image</status>
32      <year>1997</year>
33      <manufacturer>Product # 71-516</manufacturer>
34   </hash>
35   <hash crc32="c1031233" sha1="7a0165c4fb2ab0b8ba0e5c810f8f6f672a45bcf3" name="Game.com External BIOS">
36      <year>1997</year>
37      <manufacturer>Product # 71-516</manufacturer>
38   </hash>
39   <hash crc32="a0cec361" sha1="03368237e8fed4a8724f3b4a1596cf4b17c96d33" name="Game.com Internal BIOS">
40      <year>1997</year>
41      <manufacturer>Product # 71-516</manufacturer>
42   </hash>
43   <hash crc32="7e721a84" sha1="4c6b5b91a70397cb5e1add4ab53afe3ec0fe2072" name="Game.com Internet">
44      <year>1997</year>
45      <manufacturer>Product # 71-529</manufacturer>
46   </hash>
47   <hash crc32="75d3c8d8" sha1="b72a03af1dec0c621f9eda89ded3845724bb34ac" name="Henry">
48      <year>1997</year>
49      <manufacturer>Product # 71-728</manufacturer>
50   </hash>
51   <hash crc32="845ed281" sha1="117bfa1c831fbcf4a1d507cb70b6e0636c29bbd3" name="Indy 500">
52      <year>1997</year>
53      <manufacturer>Product # 71-525</manufacturer>
54   </hash>
55   <hash crc32="8c512912" sha1="c60ac5e59c3cc092506bc47adb60b40a9415bc97" name="Jeopardy!">
56      <year>1998</year>
57      <manufacturer>Product # 71-726</manufacturer>
58   </hash>
59   <hash crc32="496efa62" sha1="1d91b616caa2d35f53ec5680aada8f75e2f0ac43" name="Lights Out">
60      <year>1997</year>
61      <manufacturer>Product # 71-735</manufacturer>
62   </hash>
63   <hash crc32="b422c5f8" sha1="648badcac6c386d7ff40f917e34bd309e737c027" name="Lost World, The - Jurassic Park">
64      <year>1997</year>
65      <manufacturer>Product # 71-704</manufacturer>
66   </hash>
67   <hash crc32="d6a65a07" sha1="8057144f6995eafff6d893383114b48f4c77abc3" name="Monopoly">
68      <status>GoodGCOM Verified Image</status>
69      <year>1999</year>
70      <manufacturer>Product # 71-752</manufacturer>
71   </hash>
72   <hash crc32="bd29c844" sha1="a560ad2b916a9e4ace917d7e707cdcafbffe6e66" name="Mortal Kombat Trilogy">
73      <status>Known Bad Image</status>
74      <year>1997</year>
75      <manufacturer>Product # 71-711</manufacturer>
76   </hash>
77   <hash crc32="72893a77" sha1="d8a403a180f4a397098c8a598dd6cd5b45ef377a" name="Mortal Kombat Trilogy">
78      <year>1997</year>
79      <manufacturer>Product # 71-711</manufacturer>
80   </hash>
81   <hash crc32="0e018f6a" sha1="c9c4435bdcea2b9ddaa2768f28f286abd382608d" name="Quiz Wiz - Cyber Trivia">
82      <year>1997</year>
83      <manufacturer>Product # 71-524</manufacturer>
84   </hash>
85   <hash crc32="0984c7f5" sha1="e32357d08b07a6a8f6a7e64205cca35e50225269" name="Resident Evil 2">
86      <status>Known Bad Image</status>
87      <year>1998</year>
88      <manufacturer>Product # 71-745</manufacturer>
89   </hash>
90   <hash crc32="4f09457d" sha1="1d4d4ff13c8f7c228f30bddab174d4781b370ec9" name="Resident Evil 2">
91      <year>1998</year>
92      <manufacturer>Product # 71-745</manufacturer>
93   </hash>
94   <hash crc32="4d4ad909" sha1="2735d59964fe7c1d43bd260df86b9dfbc1bfd736" name="Scrabble">
95      <year>1999</year>
96      <manufacturer>Product # 71-754</manufacturer>
97   </hash>
98   <hash crc32="8c165064" sha1="80c693f3ae285bd84ba1fc4762bdee2676493096" name="Sonic Jam">
99      <status>Known Bad Image</status>
100      <year>1998</year>
101      <manufacturer>Product # 71-734</manufacturer>
102   </hash>
103   <hash crc32="8b4a63f9" sha1="393a98138c8825ed61990e1b15e1967f87068ac6" name="Sonic Jam">
104      <year>1998</year>
105      <manufacturer>Product # 71-734</manufacturer>
106   </hash>
107   <hash crc32="e7fb8fd9" sha1="3620491b531b9fce67545e822eff2f99c1adb4a4" name="Tiger Casino">
108      <status>Known Bad Image</status>
109      <year>1998</year>
110      <manufacturer>Product # 71-731</manufacturer>
111   </hash>
112   <hash crc32="ba698142" sha1="32ce1be96f7f367b8a0adb8cc61a8cca7d6b79dd" name="Tiger Casino">
113      <year>1998</year>
114      <manufacturer>Product # 71-731</manufacturer>
115   </hash>
116   <hash crc32="4c13e65b" sha1="d4e08fc050c006ed6c1a177a1f4c41b4a68c26bb" name="Tiger Web Link">
117      <year>1997</year>
118      <manufacturer>Product # 71-747</manufacturer>
119   </hash>
120   <hash crc32="048347a0" sha1="298c2b87754dd93481feea1d9e01585a1e269770" name="Wheel of Fortune">
121      <year>1997</year>
122      <manufacturer>Product # 71-523</manufacturer>
123   </hash>
124   <hash crc32="b91e2e32" sha1="30ddd349b8bdc21ef7ada4772ab1f3a9318ab0c8" name="Wheel of Fortune 2">
125      <status>GoodGCOM Verified Image</status>
126      <year>1998</year>
127      <manufacturer>Product # 71-527</manufacturer>
128   </hash>
129   <hash crc32="f894065d" sha1="5e2164fa76546b2795af7b04a766e31784b82eca" name="Williams Arcade Classics">
130      <year>1997</year>
131      <manufacturer>Product # 71-722</manufacturer>
132   </hash>
133</hashfile>
src/mess/tools/dat2html/dat2html.mak
r1427r1428
1###########################################################################
2#
3#   dat2html.mak
4#
5#   MESS dat2html makefile
6#
7###########################################################################
8 
9 
10# dat2html executable name
11DAT2HTML = dat2html$(EXE)
12 
13# dat2html directories
14OBJDIRS += \
15   $(MESSOBJ)/tools/dat2html \
16 
17 
18 
19#-------------------------------------------------
20# dat2html objects
21#-------------------------------------------------
22 
23DAT2HTML_OBJS =                        \
24   $(EMUOBJ)/mamecore.o               \
25   $(MESSOBJ)/tools/dat2html/dat2html.o   \
26   $(MESSOBJ)/tools/imgtool/stubs.o      \
27   $(MESSOBJ)/utils.o                  \
28 
29 
30 
31#-------------------------------------------------
32# rules for building the dat2html executable
33#-------------------------------------------------
34 
35$(DAT2HTML): $(DAT2HTML_OBJS) $(LIBUTIL) $(ZLIB) $(LIBOCORE)
36   @echo Linking $@...
37   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
38 
39 
40 
41#-------------------------------------------------
42# rule for building sysinfo.htm
43#-------------------------------------------------
44 
45sysinfo.htm: $(DAT2HTML)
46   @echo Generating $@...
47   @$(CURPATH)$(DAT2HTML) sysinfo.dat
1###########################################################################
2#
3#   dat2html.mak
4#
5#   MESS dat2html makefile
6#
7###########################################################################
8
9
10# dat2html executable name
11DAT2HTML = dat2html$(EXE)
12
13# dat2html directories
14OBJDIRS += \
15   $(MESSOBJ)/tools/dat2html \
16
17
18
19#-------------------------------------------------
20# dat2html objects
21#-------------------------------------------------
22
23DAT2HTML_OBJS =                        \
24   $(EMUOBJ)/mamecore.o               \
25   $(MESSOBJ)/tools/dat2html/dat2html.o   \
26   $(MESSOBJ)/tools/imgtool/stubs.o      \
27   $(MESSOBJ)/utils.o                  \
28
29
30
31#-------------------------------------------------
32# rules for building the dat2html executable
33#-------------------------------------------------
34 
35$(DAT2HTML): $(DAT2HTML_OBJS) $(LIBUTIL) $(ZLIB) $(LIBOCORE)
36   @echo Linking $@...
37   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
38
39
40
41#-------------------------------------------------
42# rule for building sysinfo.htm
43#-------------------------------------------------
44
45sysinfo.htm: $(DAT2HTML)
46   @echo Generating $@...
47   @$(CURPATH)$(DAT2HTML) sysinfo.dat
src/mess/machine/74145.c
r1427r1428
1/*****************************************************************************
2 *
3 * machine/74145.h
4 *
5 * BCD-to-Decimal decoder
6 * 
7 *        __ __
8 *     0-|  v  |-VCC
9 *     1-|     |-A
10 *     2-|     |-B
11 *     3-|     |-C
12 *     4-|     |-D
13 *     5-|     |-9
14 *     6-|     |-8
15 *   GND-|_____|-7
16 *
17 * 
18 * Truth table
19 *  _______________________________
20 * | Inputs  | Outputs             |
21 * | D C B A | 0 1 2 3 4 5 6 7 8 9 |
22 * |-------------------------------|
23 * | L L L L | L H H H H H H H H H |
24 * | L L L H | H L H H H H H H H H |
25 * | L L H L | H H L H H H H H H H |
26 * | L L H H | H H H L H H H H H H |
27 * | L H L L | H H H H L H H H H H |
28 * |-------------------------------|
29 * | L H L H | H H H H H L H H H H |
30 * | L H H L | H H H H H H L H H H |
31 * | L H H H | H H H H H H H L H H |
32 * | H L L L | H H H H H H H H L H |
33 * | H L L H | H H H H H H H H H L |
34 * |-------------------------------|
35 * | H L H L | H H H H H H H H H H |
36 * | H L H H | H H H H H H H H H H |
37 * | H H L L | H H H H H H H H H H |
38 * | H H L H | H H H H H H H H H H |
39 * | H H H L | H H H H H H H H H H |
40 * | H H H H | H H H H H H H H H H |
41 *  -------------------------------
42 * 
43 ****************************************************************************/
44 
45#include "74145.h"
46 
47 
48 
49/*****************************************************************************
50 Macros
51*****************************************************************************/
52 
53 
54#define MAX_74145   (1)
55 
56 
57 
58/*****************************************************************************
59 Type definitions
60*****************************************************************************/
61 
62 
63typedef struct _ttl74145_state ttl74145_state;
64struct _ttl74145_state
65{
66   /* Pointer to our interface */
67   const ttl74145_interface *intf;
68   
69   /* Decoded number */
70   UINT16 number;
71};
72 
73 
74 
75/*****************************************************************************
76 Global variables
77*****************************************************************************/
78 
79 
80static ttl74145_state ttl74145[MAX_74145];
81 
82 
83 
84/*****************************************************************************
85 Implementation
86*****************************************************************************/
87 
88 
89/* Config */
90void ttl74145_config(int which, const ttl74145_interface *intf)
91{
92   assert_always(mame_get_phase(Machine) == MAME_PHASE_INIT,
93      "Can only call ttl74145_config at init time!");
94   assert_always(which < MAX_74145,
95      "'which' exceeds maximum number of configured 74145s!");
96 
97   /* Assign interface */
98   ttl74145[which].intf = intf;
99   
100   /* Initialize */
101   ttl74145_reset(which);
102}
103 
104 
105/* Reset */
106void ttl74145_reset(int which)
107{
108   ttl74145[which].number = 0;
109}
110 
111 
112/* Data Write */
113void ttl74145_write(int which, offs_t offset, UINT8 data)
114{
115   /* Decode number */
116   UINT16 new_number = bcd_2_dec(data & 0x0f);
117   
118   /* Call output callbacks if the number changed */
119   if (new_number != ttl74145[which].number)
120   {
121      const ttl74145_interface *i = ttl74145[which].intf;
122       
123      if (i->output_line_0) i->output_line_0(new_number == 0);
124      if (i->output_line_1) i->output_line_1(new_number == 1);
125      if (i->output_line_2) i->output_line_2(new_number == 2);
126      if (i->output_line_3) i->output_line_3(new_number == 3);
127      if (i->output_line_4) i->output_line_4(new_number == 4);
128      if (i->output_line_5) i->output_line_5(new_number == 5);
129      if (i->output_line_6) i->output_line_6(new_number == 6);
130      if (i->output_line_7) i->output_line_7(new_number == 7);
131      if (i->output_line_8) i->output_line_8(new_number == 8);
132      if (i->output_line_9) i->output_line_9(new_number == 9);             
133   }
134   
135   /* Update state */
136   ttl74145[which].number = new_number;
137}
138 
139 
140WRITE8_HANDLER( ttl74145_0_w ) { ttl74145_write(0, offset, data); }
141READ16_HANDLER( ttl74145_0_r ) { return ttl74145[0].number; }
1/*****************************************************************************
2 *
3 * machine/74145.h
4 *
5 * BCD-to-Decimal decoder
6 *
7 *        __ __
8 *     0-|  v  |-VCC
9 *     1-|     |-A
10 *     2-|     |-B
11 *     3-|     |-C
12 *     4-|     |-D
13 *     5-|     |-9
14 *     6-|     |-8
15 *   GND-|_____|-7
16 *
17 *
18 * Truth table
19 *  _______________________________
20 * | Inputs  | Outputs             |
21 * | D C B A | 0 1 2 3 4 5 6 7 8 9 |
22 * |-------------------------------|
23 * | L L L L | L H H H H H H H H H |
24 * | L L L H | H L H H H H H H H H |
25 * | L L H L | H H L H H H H H H H |
26 * | L L H H | H H H L H H H H H H |
27 * | L H L L | H H H H L H H H H H |
28 * |-------------------------------|
29 * | L H L H | H H H H H L H H H H |
30 * | L H H L | H H H H H H L H H H |
31 * | L H H H | H H H H H H H L H H |
32 * | H L L L | H H H H H H H H L H |
33 * | H L L H | H H H H H H H H H L |
34 * |-------------------------------|
35 * | H L H L | H H H H H H H H H H |
36 * | H L H H | H H H H H H H H H H |
37 * | H H L L | H H H H H H H H H H |
38 * | H H L H | H H H H H H H H H H |
39 * | H H H L | H H H H H H H H H H |
40 * | H H H H | H H H H H H H H H H |
41 *  -------------------------------
42 *
43 ****************************************************************************/
44
45#include "74145.h"
46
47
48
49/*****************************************************************************
50 Macros
51*****************************************************************************/
52
53
54#define MAX_74145   (1)
55
56
57
58/*****************************************************************************
59 Type definitions
60*****************************************************************************/
61
62
63typedef struct _ttl74145_state ttl74145_state;
64struct _ttl74145_state
65{
66   /* Pointer to our interface */
67   const ttl74145_interface *intf;
68   
69   /* Decoded number */
70   UINT16 number;
71};
72
73
74
75/*****************************************************************************
76 Global variables
77*****************************************************************************/
78
79
80static ttl74145_state ttl74145[MAX_74145];
81
82
83
84/*****************************************************************************
85 Implementation
86*****************************************************************************/
87
88
89/* Config */
90void ttl74145_config(int which, const ttl74145_interface *intf)
91{
92   assert_always(mame_get_phase(Machine) == MAME_PHASE_INIT,
93      "Can only call ttl74145_config at init time!");
94   assert_always(which < MAX_74145,
95      "'which' exceeds maximum number of configured 74145s!");
96
97   /* Assign interface */
98   ttl74145[which].intf = intf;
99   
100   /* Initialize */
101   ttl74145_reset(which);
102}
103
104
105/* Reset */
106void ttl74145_reset(int which)
107{
108   ttl74145[which].number = 0;
109}
110
111
112/* Data Write */
113void ttl74145_write(int which, offs_t offset, UINT8 data)
114{
115   /* Decode number */
116   UINT16 new_number = bcd_2_dec(data & 0x0f);
117   
118   /* Call output callbacks if the number changed */
119   if (new_number != ttl74145[which].number)
120   {
121      const ttl74145_interface *i = ttl74145[which].intf;
122     
123      if (i->output_line_0) i->output_line_0(new_number == 0);
124      if (i->output_line_1) i->output_line_1(new_number == 1);
125      if (i->output_line_2) i->output_line_2(new_number == 2);
126      if (i->output_line_3) i->output_line_3(new_number == 3);
127      if (i->output_line_4) i->output_line_4(new_number == 4);
128      if (i->output_line_5) i->output_line_5(new_number == 5);
129      if (i->output_line_6) i->output_line_6(new_number == 6);
130      if (i->output_line_7) i->output_line_7(new_number == 7);
131      if (i->output_line_8) i->output_line_8(new_number == 8);
132      if (i->output_line_9) i->output_line_9(new_number == 9);           
133   }
134   
135   /* Update state */
136   ttl74145[which].number = new_number;
137}
138
139
140WRITE8_HANDLER( ttl74145_0_w ) { ttl74145_write(0, offset, data); }
141READ16_HANDLER( ttl74145_0_r ) { return ttl74145[0].number; }
src/mess/machine/74145.h
r1427r1428
1/*****************************************************************************
2 *
3 * machine/74145.h
4 *
5 ****************************************************************************/
6 
7#ifndef TTL74145_H_
8#define TTL74145_H_
9 
10#include "driver.h"
11 
12/* Interface */
13typedef struct _ttl74145_interface ttl74145_interface;
14struct _ttl74145_interface
15{
16   /* Outputs */
17   void (*output_line_0)(int state);
18   void (*output_line_1)(int state);
19   void (*output_line_2)(int state);
20   void (*output_line_3)(int state);
21   void (*output_line_4)(int state);
22   void (*output_line_5)(int state);
23   void (*output_line_6)(int state);
24   void (*output_line_7)(int state);
25   void (*output_line_8)(int state);
26   void (*output_line_9)(int state);
27};
28 
29/* Configuration */
30void ttl74145_config(int which, const ttl74145_interface *intf);
31void ttl74145_reset(int which);
32 
33/* Standard handlers */
34WRITE8_HANDLER( ttl74145_0_w );
35READ16_HANDLER( ttl74145_0_r );
36 
37#endif /*TTL74145_H_*/
1/*****************************************************************************
2 *
3 * machine/74145.h
4 *
5 ****************************************************************************/
6
7#ifndef TTL74145_H_
8#define TTL74145_H_
9
10#include "driver.h"
11
12/* Interface */
13typedef struct _ttl74145_interface ttl74145_interface;
14struct _ttl74145_interface
15{
16   /* Outputs */
17   void (*output_line_0)(int state);
18   void (*output_line_1)(int state);
19   void (*output_line_2)(int state);
20   void (*output_line_3)(int state);
21   void (*output_line_4)(int state);
22   void (*output_line_5)(int state);
23   void (*output_line_6)(int state);
24   void (*output_line_7)(int state);
25   void (*output_line_8)(int state);
26   void (*output_line_9)(int state);
27};
28
29/* Configuration */
30void ttl74145_config(int which, const ttl74145_interface *intf);
31void ttl74145_reset(int which);
32
33/* Standard handlers */
34WRITE8_HANDLER( ttl74145_0_w );
35READ16_HANDLER( ttl74145_0_r );
36
37#endif /*TTL74145_H_*/
src/mess/drivers/bbcbc.c
r1427r1428
1/***************************************************************************
2 
3  bbcbc.c
4 
5  BBC Bridge Companion
6 
7  TODO:
8  Inputs
9  Find correct clock frequencies
10 
11***************************************************************************/
12#include "driver.h"
13#include "video/tms9928a.h"
14#include "machine/z80pio.h"
15#include "devices/cartslot.h"
16 
17static ADDRESS_MAP_START( bbcbc_prg, ADDRESS_SPACE_PROGRAM, 8 )
18   AM_RANGE(0x00000, 0x03fff) AM_ROM
19   AM_RANGE(0x04000, 0x0bfff) AM_ROM
20   AM_RANGE(0x0e000, 0x0e7ff) AM_RAM
21ADDRESS_MAP_END
22 
23static ADDRESS_MAP_START( bbcbc_io, ADDRESS_SPACE_IO, 8 )
24   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
25   AM_RANGE(0x40, 0x40) AM_READWRITE(z80pioA_0_p_r, z80pioA_0_p_w)
26   AM_RANGE(0x80, 0x80) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w)
27   AM_RANGE(0x81, 0x81) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w)
28ADDRESS_MAP_END
29 
30static void tms_interrupt(int dummy)
31{
32   cpunum_set_input_line(0, 0, HOLD_LINE);
33}
34 
35static INTERRUPT_GEN( bbcbc_interrupt )
36{
37    TMS9928A_interrupt();
38}
39 
40INPUT_PORTS_START( bbcbc )
41INPUT_PORTS_END
42 
43static const TMS9928a_interface tms9129_interface =
44{
45   TMS9929A,
46   0x4000,
47   0, 0,
48   tms_interrupt
49};
50 
51/* TODO */
52static const z80pio_interface pio_intf = 
53{
54   NULL,
55   NULL,
56   NULL
57};
58 
59static MACHINE_START( bbcbc )
60{
61   TMS9928A_configure(&tms9129_interface);
62}
63 
64static MACHINE_RESET( bbcbc )
65{
66}
67 
68 
69static MACHINE_DRIVER_START( bbcbc )
70   MDRV_CPU_ADD_TAG( "main", Z80, 4000000 )
71   MDRV_CPU_PROGRAM_MAP( bbcbc_prg, 0 )
72   MDRV_CPU_IO_MAP( bbcbc_io, 0 )
73 
74   MDRV_MACHINE_START( bbcbc )
75   MDRV_MACHINE_RESET( bbcbc )
76 
77   MDRV_CPU_VBLANK_INT( bbcbc_interrupt, 1 )
78   MDRV_SCREEN_REFRESH_RATE( 50 )
79   MDRV_IMPORT_FROM( tms9928a )
80MACHINE_DRIVER_END
81 
82 
83ROM_START( bbcbc )
84   ROM_REGION( 0x10000, REGION_CPU1, 0 )
85   ROM_LOAD("br_4_1.ic3", 0x0000, 0x2000, CRC(7c880d75) SHA1(954db096bd9e8edfef72946637a12f1083841fb0))
86   ROM_LOAD("br_4_2.ic4", 0x2000, 0x2000, CRC(16a33aef) SHA1(9529f9f792718a3715af2063b91a5fb18f741226))
87   ROM_CART_LOAD(0, "bin", 0x4000, 0xBFFF, ROM_NOMIRROR | ROM_OPTIONAL)
88ROM_END
89 
90SYSTEM_CONFIG_START( bbcbc )
91    CONFIG_DEVICE(cartslot_device_getinfo)
92SYSTEM_CONFIG_END
93 
94/***************************************************************************
95 
96  Game driver(s)
97 
98***************************************************************************/
99 
100/*   YEAR  NAME  PARENT  COMPAT  MACHINE INPUT  INIT  CONFIG  COMPANY  FULLNAME  FLAGS */
101CONS(1985, bbcbc,     0, 0,      bbcbc,  bbcbc, 0,    bbcbc,  "BBC",   "Bridge Companion", GAME_NOT_WORKING )
102 
1/***************************************************************************
2
3  bbcbc.c
4
5  BBC Bridge Companion
6
7  TODO:
8  Inputs
9  Find correct clock frequencies
10
11***************************************************************************/
12#include "driver.h"
13#include "video/tms9928a.h"
14#include "machine/z80pio.h"
15#include "devices/cartslot.h"
16
17static ADDRESS_MAP_START( bbcbc_prg, ADDRESS_SPACE_PROGRAM, 8 )
18   AM_RANGE(0x00000, 0x03fff) AM_ROM
19   AM_RANGE(0x04000, 0x0bfff) AM_ROM
20   AM_RANGE(0x0e000, 0x0e7ff) AM_RAM
21ADDRESS_MAP_END
22
23static ADDRESS_MAP_START( bbcbc_io, ADDRESS_SPACE_IO, 8 )
24   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
25   AM_RANGE(0x40, 0x40) AM_READWRITE(z80pioA_0_p_r, z80pioA_0_p_w)
26   AM_RANGE(0x80, 0x80) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w)
27   AM_RANGE(0x81, 0x81) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w)
28ADDRESS_MAP_END
29
30static void tms_interrupt(int dummy)
31{
32   cpunum_set_input_line(0, 0, HOLD_LINE);
33}
34
35static INTERRUPT_GEN( bbcbc_interrupt )
36{
37    TMS9928A_interrupt();
38}
39
40INPUT_PORTS_START( bbcbc )
41INPUT_PORTS_END
42
43static const TMS9928a_interface tms9129_interface =
44{
45   TMS9929A,
46   0x4000,
47   0, 0,
48   tms_interrupt
49};
50
51/* TODO */
52static const z80pio_interface pio_intf =
53{
54   NULL,
55   NULL,
56   NULL
57};
58
59static MACHINE_START( bbcbc )
60{
61   TMS9928A_configure(&tms9129_interface);
62}
63
64static MACHINE_RESET( bbcbc )
65{
66}
67
68
69static MACHINE_DRIVER_START( bbcbc )
70   MDRV_CPU_ADD_TAG( "main", Z80, 4000000 )
71   MDRV_CPU_PROGRAM_MAP( bbcbc_prg, 0 )
72   MDRV_CPU_IO_MAP( bbcbc_io, 0 )
73
74   MDRV_MACHINE_START( bbcbc )
75   MDRV_MACHINE_RESET( bbcbc )
76
77   MDRV_CPU_VBLANK_INT( bbcbc_interrupt, 1 )
78   MDRV_SCREEN_REFRESH_RATE( 50 )
79   MDRV_IMPORT_FROM( tms9928a )
80MACHINE_DRIVER_END
81
82
83ROM_START( bbcbc )
84   ROM_REGION( 0x10000, REGION_CPU1, 0 )
85   ROM_LOAD("br_4_1.ic3", 0x0000, 0x2000, CRC(7c880d75) SHA1(954db096bd9e8edfef72946637a12f1083841fb0))
86   ROM_LOAD("br_4_2.ic4", 0x2000, 0x2000, CRC(16a33aef) SHA1(9529f9f792718a3715af2063b91a5fb18f741226))
87   ROM_CART_LOAD(0, "bin", 0x4000, 0xBFFF, ROM_NOMIRROR | ROM_OPTIONAL)
88ROM_END
89
90SYSTEM_CONFIG_START( bbcbc )
91    CONFIG_DEVICE(cartslot_device_getinfo)
92SYSTEM_CONFIG_END
93
94/***************************************************************************
95
96  Game driver(s)
97
98***************************************************************************/
99
100/*   YEAR  NAME  PARENT  COMPAT  MACHINE INPUT  INIT  CONFIG  COMPANY  FULLNAME  FLAGS */
101CONS(1985, bbcbc,     0, 0,      bbcbc,  bbcbc, 0,    bbcbc,  "BBC",   "Bridge Companion", GAME_NOT_WORKING )
102

Previous 15994 Revisions Next


© 1998-2018 The MESS Team