Previous 15994 Revisions Next

r4943 Friday 5th June, 2009 at 04:51:01 UTC by Robbbert
[SUPER80] Added cassette LED to bottom corner of the screen.
[src/mess/drivers]super80.c
[src/mess/layout]super80.lay
[src/mess/machine]super80.c
[src/mess/video]super80.c

src/mess/video/super80.c
r4942r4943
102102   UINT16 sy=0,ma=vidpg,x;
103103   UINT8 *RAM = memory_region(screen->machine, "maincpu");
104104
105   output_set_value("cass_led",(super80_shared & 0x20) ? 1 : 0);
106
105107   if ((super80_shared & 4) || (!(input_port_read(screen->machine, "CONFIG") & 4)))   /* bit 2 of port F0 is high, OR user turned on config switch */
106108      screen_on++;
107109
r4942r4943
141143   UINT16 sy=0,ma=vidpg,x;
142144   UINT8 *RAM = memory_region(screen->machine, "maincpu");
143145
146   output_set_value("cass_led",(super80_shared & 0x20) ? 1 : 0);
147
144148   if ((super80_shared & 4) || (!(input_port_read(screen->machine, "CONFIG") & 4)))   /* bit 2 of port F0 is high, OR user turned on config switch */
145149      screen_on++;
146150
r4942r4943
180184   UINT16 sy=0,ma=vidpg,x;
181185   UINT8 *RAM = memory_region(screen->machine, "maincpu");
182186
187   output_set_value("cass_led",(super80_shared & 0x20) ? 1 : 0);
188
183189   if ((super80_shared & 4) || (!(input_port_read(screen->machine, "CONFIG") & 4)))   /* bit 2 of port F0 is high, OR user turned on config switch */
184190      screen_on++;
185191
r4942r4943
223229   /* get selected character generator */
224230   UINT8 cgen = current_charset ^ ((options & 0x10)>>4);   /* bit 0 of port F1 and cgen config switch */
225231
232   output_set_value("cass_led",(super80_shared & 0x20) ? 1 : 0);
233
226234   if ((super80_shared & 4) || (!(options & 4)))   /* bit 2 of port F0 is high, OR user turned on config switch */
227235      screen_on++;
228236
r4942r4943
399407   speed = mc6845_reg[10]&0x20, flash = mc6845_reg[10]&0x40, bg=0;         // cursor modes
400408   cursor = (mc6845_reg[14]<<8) | mc6845_reg[15];               // get cursor position
401409   options=input_port_read(screen->machine, "CONFIG");
410   output_set_value("cass_led",(super80_shared & 0x20) ? 1 : 0);
402411   mc6845_update(mc6845, bitmap, cliprect);
403412   return 0;
404413}
src/mess/machine/super80.c
r4942r4943
204204   super80_shared = data;
205205   speaker_level_w(super80_speaker, (data & 8) ? 0 : 1);            /* bit 3 - speaker */
206206   if (bits & 2) super80_cassette_motor(space->machine, data & 2 ? 1 : 0);   /* bit 1 - cassette motor */
207   if (bits & 1) cassette_output(super80_cassette, (data & 1) ? -1.0 : +1.0);   /* bit 0 - cass out */
207   cassette_output(super80_cassette, (data & 1) ? -1.0 : +1.0);   /* bit 0 - cass out */
208208 
209209   last_data = data;
210210}
src/mess/layout/super80.lay
r4942r4943
2020 
2121   <view name="Cassette LED">
2222   <!--   <bezel name="cass_txt" element="CASSETTE">
23         <bounds left="0" right="100" top="830" bottom="850" />
24      </bezel>
23         <bounds left="0" right="100" top="1030" bottom="1050" />
24      </bezel> -->
2525      <bezel name="cass_led" element="red_led">
26         <bounds left="110" right="130" top="830" bottom="850" />
26         <bounds left="0" right="20" top="1020" bottom="1045" />
2727      </bezel>
28      <bezel element="background">
28   <!--   <bezel element="background">
2929         <bounds left="0" top="850" right="1" bottom="855" />
3030      </bezel> -->
3131      <screen index="0">
32         <bounds x="0" y="0" width="1400" height="1000" />
32         <bounds x="0" y="0" width="1400" height="1050" />
3333      </screen>
3434   </view>
3535 
src/mess/drivers/super80.c
r4942r4943
1010#include "devices/z80bin.h"
1111#include "sound/speaker.h"
1212#include "machine/ctronics.h"
13#include "super80.lh"
1314#include "super80.h"
1415
1516UINT8 *pcgram;
r4942r4943
396397   MDRV_PALETTE_LENGTH(2)
397398   MDRV_PALETTE_INIT(black_and_white)
398399
400   MDRV_DEFAULT_LAYOUT( layout_super80 )
399401   MDRV_VIDEO_START(super80)
400402   MDRV_VIDEO_UPDATE(super80)
401403
r4942r4943
461463
462464   MDRV_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / SUPER80V_DOTS, super80v_crtc)
463465
466   MDRV_DEFAULT_LAYOUT( layout_super80 )
464467   MDRV_VIDEO_START(super80v)
465468   MDRV_VIDEO_EOF(super80m)
466469   MDRV_VIDEO_UPDATE(super80v)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team