Previous 15994 Revisions Next

r3289 Friday 19th September, 2008 at 10:54:00 UTC by Nathan Woods
1. [GENEVE] Fixed RTC to start on Sunday. [Michael Zapf]

2. [TI99] Changed ESC key to map to F12. [Michael Zapf]
[docs]messnew.txt
[src/mess/drivers]ti99_4x.c
[src/mess/machine]99_dsk.c compis.c concept.c geneve.c mm58274c.c mm58274c.h

src/mess/machine/99_dsk.c
r3288r3289
408408   motor_on_timer = timer_alloc(motor_on_timer_callback, NULL);
409409   
410410   /* initialize the RTC for BwG and HFDC */
411   mm58274c_init(machine, 1, 1);
411   mm58274c_init(machine, 1, 1, 0);
412412}
413413
414414/*===========================================================================*/
src/mess/machine/compis.c
r3288r3289
15471547   compis_fdc_reset(machine);
15481548
15491549   /* RTC */
1550   mm58274c_init(machine, 0, 0);
1550   mm58274c_init(machine, 0, 0, 1);
15511551
15521552   /* Setup the USART */
15531553   msm8251_init(&compis_usart_interface);
src/mess/machine/concept.c
r3288r3289
9696
9797   /* initialize clock interface */
9898   clock_enable = 0/*1*/;
99   mm58274c_init(machine, 0, 0);
99   mm58274c_init(machine, 0, 0, 1);
100100
101101   /* clear keyboard interface state */
102102   KeyQueueHead = KeyQueueLen = 0;
src/mess/machine/geneve.c
r3288r3289
213213        ti99_ide_init(machine);
214214        ti99_rs232_init(machine);
215215   ti99_usbsm_init(machine);
216   mm58274c_init(machine, 0, 1);
216   mm58274c_init(machine, 0, 1, 0);
217217   add_exit_callback(machine, machine_stop_geneve);
218218}
219219
src/mess/machine/mm58274c.c
r3288r3289
3636   int int_ctl;   /* interrupt control register */
3737
3838
39   int wday;      /* day of the week (1-7 (1=monday, 7=sunday)) */
39   int wday;      /* day of the week (1-7 (1=day1 as set in init)) */
4040   int years1;      /* years (BCD: 0-99) */
4141   int years2;
4242   int months1;   /* months (BCD: 1-12) */
r3288r3289
8989   }
9090};
9191
92
93void mm58274c_init(running_machine *machine, int which, int mode24)
92/*
93   Initializes the clock chip.
94   day1 must be set to a value from 0 (sunday), 1 (monday) ...
95   to 6 (saturday)   and is needed to correctly retrieve the day-of-week
96   from the host system clock.
97*/
98void mm58274c_init(running_machine *machine, int which, int mode24, int day1)
9499{
95100   memset(&rtc[which], 0, sizeof(rtc[which]));
96
97101   timer_pulse(ATTOTIME_IN_MSEC(100), NULL, which, increment_rtc);
98102   rtc[which].interrupt_timer = timer_alloc(rtc_interrupt_callback, NULL);
99103
r3288r3289
106110      rtc[which].clk_set = systime.local_time.year & 3 << 2;
107111      if (mode24)
108112         rtc[which].clk_set |= clk_set_24;
109
113                   
110114      /* The clock count starts on 1st January 1900 */
111      rtc[which].wday = systime.local_time.weekday ? systime.local_time.weekday : 7;
115      rtc[which].wday = 1 + ((systime.local_time.weekday - day1)%7);
112116      rtc[which].years1 = (systime.local_time.year / 10) % 10;
113117      rtc[which].years2 = systime.local_time.year % 10;
114118      rtc[which].months1 = (systime.local_time.month + 1) / 10;
src/mess/machine/mm58274c.h
r3288r3289
22#define MM58274C_H
33
44
5extern void mm58274c_init(running_machine *machine, int which, int mode24);
5extern void mm58274c_init(running_machine *machine, int which, int mode24, int day1);
66extern int mm58274c_r(int which, int offset);
77extern void mm58274c_w(int which, int offset, int data);
88
src/mess/drivers/ti99_4x.c
r3288r3289
166166      PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FCTN")      PORT_CODE(KEYCODE_RALT) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_SHIFT_2)
167167      PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
168168      PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
169      PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("= + QUIT")  PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') PORT_CHAR(UCHAR_MAMEKEY(ESC))
169      PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("= + QUIT")  PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') PORT_CHAR(UCHAR_MAMEKEY(F12))
170170            /* col 1 */
171171      PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X)     PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(UCHAR_MAMEKEY(DOWN))
172172      PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W)     PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR('~')
r3288r3289
299299   /* 4 ports for keyboard and joystick */
300300   PORT_START("KEY0")   /* col 0 */
301301      PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
302      PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q QUIT") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR(UCHAR_MAMEKEY(ESC))
302      PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q QUIT") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR(UCHAR_MAMEKEY(F12))
303303      /* TI99/4 has a second space key which maps the same */
304304      PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(' ')
305305      PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
docs/messnew.txt
r3288r3289
8686  we will start to use the correct ones. If you own a C128 PAL, please
8787  dump its BIOS to verify its content. [Fabio Priuli]
8888
89- [GENEVE] Fixed RTC to start on Sunday.  [Michael Zapf]
90
8991- [OSCNANO] Implemented RUN/MONITOR keys properly, changed video to
9092  black and white, and fixed quickloading. System is now fully
9193  working, including the "Säkkijärven polkka" program. [Curt Coder]
r3288r3289
107109  memory addresses to be working. More work when/if more documents will
108110  be available [Fabio Priuli]
109111
112- [TI99] Changed ESC key to map to F12.  [Michael Zapf]
113
110114- [TMC2000] Fixed quickloading. [Curt Coder]
111115
112116- [TRS80] Added proper cassette emulation support.  [Wilbert Pol]

Previous 15994 Revisions Next


© 1998-2018 The MESS Team