Previous 199869 Revisions Next

r19599 Sunday 16th December, 2012 at 19:01:53 UTC by David Haywood
be a bit less printf spammy when running these (nw)
[src/mame]mame.mak
[src/mame/drivers]ecoinf3.c
[src/mame/layout]ecoinf3.lay*

trunk/src/mame/mame.mak
r19598r19599
20792079
20802080$(DRIVERS)/dragrace.o:   $(LAYOUT)/dragrace.lh
20812081
2082$(DRIVERS)/ecoinf3.o:   $(LAYOUT)/ecoinf3.lh
2083
20822084$(DRIVERS)/firebeat.o:   $(LAYOUT)/firebeat.lh
20832085
20842086$(DRIVERS)/firetrk.o:   $(LAYOUT)/superbug.lh
trunk/src/mame/layout/ecoinf3.lay
r0r19599
1<?xml version="1.0"?>
2<mamelayout version="2">
3  <element name="vfd0">
4     <led16segsc>
5           <color red="1.0" green="0.2" blue="0.1" />
6     </led16segsc>
7  </element>
8
9
10   <view name="AWP Simulated Video (No Artwork)">
11   <backdrop name="vfd0" element="vfd0" state="0">
12         <bounds x="17" y="280" width="7" height="10"/>
13      </backdrop>
14      <backdrop name="vfd1" element="vfd0" state="0">
15         <bounds x="24" y="280" width="7" height="10"/>
16      </backdrop>
17      <backdrop name="vfd2" element="vfd0" state="0">
18         <bounds x="31" y="280" width="7" height="10"/>
19      </backdrop>
20      <backdrop name="vfd3" element="vfd0" state="0">
21         <bounds x="38" y="280" width="7" height="10"/>
22      </backdrop>
23      <backdrop name="vfd4" element="vfd0" state="0">
24         <bounds x="45" y="280" width="7" height="10"/>
25      </backdrop>
26      <backdrop name="vfd5" element="vfd0" state="0">
27         <bounds x="52" y="280" width="7" height="10"/>
28      </backdrop>
29      <backdrop name="vfd6" element="vfd0" state="0">
30         <bounds x="59" y="280" width="7" height="10"/>
31      </backdrop>
32      <backdrop name="vfd7" element="vfd0" state="0">
33         <bounds x="66" y="280" width="7" height="10"/>
34      </backdrop>
35      <backdrop name="vfd8" element="vfd0" state="0">
36         <bounds x="73" y="280" width="7" height="10"/>
37      </backdrop>
38      <backdrop name="vfd9" element="vfd0" state="0">
39         <bounds x="80" y="280" width="7" height="10"/>
40      </backdrop>
41      <backdrop name="vfd10" element="vfd0" state="0">
42         <bounds x="87" y="280" width="7" height="10"/>
43      </backdrop>
44      <backdrop name="vfd11" element="vfd0" state="0">
45         <bounds x="94" y="280" width="7" height="10"/>
46      </backdrop>
47      <backdrop name="vfd12" element="vfd0" state="0">
48         <bounds x="101" y="280" width="7" height="10"/>
49      </backdrop>
50      <backdrop name="vfd13" element="vfd0" state="0">
51         <bounds x="108" y="280" width="7" height="10"/>
52      </backdrop>
53
54
55   </view>
56</mamelayout>
57
trunk/src/mame/drivers/ecoinf3.c
r19598r19599
1313#include "emu.h"
1414#include "cpu/z180/z180.h"
1515#include "machine/i8255.h"
16#include "ecoinf3.lh"
1617
1718class ecoinf3_state : public driver_device
1819{
r19598r19599
2223
2324
2425
26   UINT16 m_chars[14];
27   void update_display();
28
2529   DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_a);
2630   DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_b);
2731   DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_c);
r19598r19599
7074   DEVCB_NULL                  /* Port C write */
7175};
7276
77// this is a copy of roc10937charset for now, I don't know what chip we're meant be using here
78// it is some kind of 14 digit, 16 seg display tho
79static const UINT16 ecoin_charset[]=
80{            // FEDC BA98 7654 3210
81   0x507F, // 0101 0000 0111 1111 @.
82   0x44CF, // 0100 0100 1100 1111 A.
83   0x153F, // 0001 0101 0011 1111 B.
84   0x00F3, // 0000 0000 1111 0011 C.
85   0x113F, // 0001 0001 0011 1111 D.
86   0x40F3, // 0100 0000 1111 0011 E.
87   0x40C3, // 0100 0000 1100 0011 F.
88   0x04FB, // 0000 0100 1111 1011 G.
89   0x44CC, // 0100 0100 1100 1100 H.
90   0x1133, // 0001 0001 0011 0011 I.
91   0x007C, // 0000 0000 0111 1100 J.
92   0x4AC0, // 0100 1010 1100 0000 K.
93   0x00F0, // 0000 0000 1111 0000 L.
94   0x82CC, // 1000 0010 1100 1100 M.
95   0x88CC, // 1000 1000 1100 1100 N.
96   0x00FF, // 0000 0000 1111 1111 O.
97   0x44C7, // 0100 0100 1100 0111 P.
98   0x08FF, // 0000 1000 1111 1111 Q.
99   0x4CC7, // 0100 1100 1100 0111 R.
100   0x44BB, // 0100 0100 1011 1011 S.
101   0x1103, // 0001 0001 0000 0011 T.
102   0x00FC, // 0000 0000 1111 1100 U.
103   0x22C0, // 0010 0010 1100 0000 V.
104   0x28CC, // 0010 1000 1100 1100 W.
105   0xAA00, // 1010 1010 0000 0000 X.
106   0x9200, // 1001 0010 0000 0000 Y.
107   0x2233, // 0010 0010 0011 0011 Z.
108   0x00E1, // 0000 0000 1110 0001 [.
109   0x8800, // 1000 1000 0000 0000 \.
110   0x001E, // 0000 0000 0001 1110 ].
111   0x2800, // 0010 1000 0000 0000 ^.
112   0x0030, // 0000 0000 0011 0000 _.
113   0x0000, // 0000 0000 0000 0000 dummy.
114   0x8121, // 1000 0001 0010 0001 !.
115   0x0180, // 0000 0001 1000 0000 ".
116   0x553C, // 0101 0101 0011 1100 #.
117   0x55BB, // 0101 0101 1011 1011 $.
118   0x7799, // 0111 0111 1001 1001 %.
119   0xC979, // 1100 1001 0111 1001 &.
120   0x0200, // 0000 0010 0000 0000 '.
121   0x0A00, // 0000 1010 0000 0000 (.
122   0xA050, // 1010 0000 0000 0000 ).
123   0xFF00, // 1111 1111 0000 0000 *.
124   0x5500, // 0101 0101 0000 0000 +.
125   0x0000, // 0000 0000 0000 0000 ;. (Set separately)
126   0x4400, // 0100 0100 0000 0000 --.
127   0x0000, // 0000 0000 0000 0000 . .(Set separately)
128   0x2200, // 0010 0010 0000 0000 /.
129   0x22FF, // 0010 0010 1111 1111 0.
130   0x1100, // 0001 0001 0000 0000 1.
131   0x4477, // 0100 0100 0111 0111 2.
132   0x443F, // 0100 0100 0011 1111 3.
133   0x448C, // 0100 0100 1000 1100 4.
134   0x44BB, // 0100 0100 1011 1011 5.
135   0x44FB, // 0100 0100 1111 1011 6.
136   0x000F, // 0000 0000 0000 1111 7.
137   0x44FF, // 0100 0100 1111 1111 8.
138   0x44BF, // 0100 0100 1011 1111 9.
139   0x0021, // 0000 0000 0010 0001 -
140           //                     -.
141   0x2001, // 0010 0000 0000 0001 -
142          //                     /.
143   0x2430, // 0010 0100 0011 0000 <.
144   0x4430, // 0100 0100 0011 0000 =.
145   0x8830, // 1000 1000 0011 0000 >.
146   0x1407, // 0001 0100 0000 0111 ?.
147};
148
149static UINT32 set_display(UINT32 segin)
150{
151   return BITSWAP32(segin, 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,11,9,15,13,12,8,10,14,7,6,5,4,3,2,1,0);
152}
153
154void ecoinf3_state::update_display()
155{
156   for (int i =0; i<14; i++)
157   {
158      output_set_indexed_value("vfd", i, set_display(m_chars[i]) );
159   }
160}
161
162
73163WRITE8_MEMBER(ecoinf3_state::ppi8255_intf_e_write_a)
74164{
75165   static UINT8 send_buffer = 0;
r19598r19599
94184      {
95185         if ((send_buffer>=0x20) && (send_buffer<0x5b))
96186         {
97            printf("%c", send_buffer);
187            if (count<14)
188            {
189               int chr = send_buffer & 0x3f;
190
191               if (chr>0 && chr<0x3f)
192                  m_chars[count] =  ecoin_charset[chr];
193
194            }
195            //printf("%c", send_buffer);
98196         }
99197         else
100198         {
101            printf(" (%02x) ", send_buffer);
199            // control characters?
200            //printf(" (%02x) ", send_buffer);
102201            count = -1;
103202         }
104203
105204         count++;
106         if (count%14 == 0) printf("\n");
205         if (count%14 == 0)
206         {
207            //printf("\n");
208            count = 0;
107209
210         }
108211
212
109213         send_buffer = 0x00;
110214      }
111215   }
r19598r19599
114218      send_buffer = data;
115219   }
116220
221   update_display();
117222
118
119223}
120224
121225WRITE8_MEMBER(ecoinf3_state::ppi8255_intf_e_write_b)
r19598r19599
407511INPUT_PORTS_END
408512
409513
514
410515static MACHINE_CONFIG_START( ecoinf3_pyramid, ecoinf3_state )
411516   /* basic machine hardware */
412517   MCFG_CPU_ADD("maincpu", Z180,16000000) // certainly not a plain z80 at least, invalid opcodes for that
518   
413519   MCFG_CPU_PROGRAM_MAP(pyramid_memmap)
414520   MCFG_CPU_IO_MAP(pyramid_portmap)
415521
522   MCFG_DEFAULT_LAYOUT(layout_ecoinf3)
523
416524   MCFG_I8255_ADD( "ppi8255_a", ppi8255_intf_a )
417525   MCFG_I8255_ADD( "ppi8255_b", ppi8255_intf_b )
418526   MCFG_I8255_ADD( "ppi8255_c", ppi8255_intf_c )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team