Previous 15994 Revisions Next

r11072 Sunday 3rd April, 2011 at 20:20:35 UTC by Angelo Salese
[X1]: Removed unused variables, fixed wram init, fixes Hi Speed Worry regression on x1turbo and allows Take the A-Train to boot
[src/mess/drivers]x1.c
[src/mess/includes]x1.h

src/mess/includes/x1.h
r11071r11072
8080   x1_state(running_machine &machine, const driver_device_config_base &config)
8181      : driver_device(machine, config) { }
8282
83   UINT8 *m_tvram;
84   UINT8 *m_avram;
85   UINT8 *m_kvram;
83   UINT8 m_tvram[0x800];
84   UINT8 m_avram[0x800];
85   UINT8 m_kvram[0x800];
8686   UINT8 m_hres_320;
8787   UINT8 m_io_switch;
8888   UINT8 m_io_sys;
8989   UINT8 m_vsync;
9090   UINT8 m_vdisp;
9191   UINT8 m_io_bank_mode;
92   UINT8 *m_gfx_bitmap_ram;
93   UINT16 m_pcg_index[3];
92   UINT8 m_gfx_bitmap_ram[0xc000*2];
9493   UINT8 m_pcg_reset;
9594   UINT8 m_sub_obf;
9695   UINT8 m_ctc_irq_flag;
r11071r11072
110109   UINT8 m_rom_index[3];
111110   UINT32 m_kanji_offset;
112111   UINT8 m_bios_offset;
113   UINT8 m_pcg_index_r[3];
114112   UINT8 m_x_b;
115113   UINT8 m_x_g;
116114   UINT8 m_x_r;
r11071r11072
126124   UINT8 m_key_irq_flag;
127125   UINT8 m_key_irq_vector;
128126   UINT32 m_emm_addr;
129   UINT8 *m_pal_4096;
127   UINT8 m_pal_4096[0x1000*3];
130128   UINT8 m_crtc_vreg[0x100],m_crtc_index;
131129   UINT8 m_is_turbo;
132130   UINT8 m_ex_bank;
src/mess/drivers/x1.c
r11071r11072
2828      - specific x1turboz features?
2929
3030    per-game/program specific TODO:
31 - Dragon Buster: it crashed to me once with a obj flag hang;
31   - CZ8FB02 / CZ8FB03: doesn't load at all, they are 2hd floppies apparently;
3232   - Chack'n Pop: game is too fast, presumably missing wait states;
33    - Dragon Buster: it crashed to me once with a obj flag hang;
3334    - The Goonies (x1 only): goes offsync with the PCG beam positions;
3435   - Graphtol: sets up x1turboz paletteram, graphic garbage due of it;
3536    - Gyajiko2: hangs when it's supposed to load the character selection screen, FDC bug?
r11071r11072
4142   - Shilver Ghost: changes the vertical visible area during scrolling, and that doesn't work too well with current mc6845 core.
4243   - Suikoden: shows a JP message error (DFJustin: "Problem with the disk device !! Please set a floppy disk properly and press the return key. Retrying.")
4344   - Super Billiards (X1 Pack 14): has a slight PCG timing bug, that happens randomly;
44    - Take the A-Train: returns to basic prompt if you try to start a play, missing disk perhaps?
4545   - Trivia-Q: dunno what to do on the selection screen, missing inputs?
4646    - Turbo Alpha: has z80dma / fdc bugs, doesn't show the presentation properly and then hangs;
4747    - Will 2: doesn't load, fdc issue presumably (note: it's a x1turbo game ONLY);
r11071r11072
206206************************************************************************************************/
207207
208208#include "emu.h"
209#include "includes/x1.h"
209210#include "cpu/z80/z80.h"
210211#include "cpu/z80/z80daisy.h"
211212#include "machine/z80ctc.h"
r11071r11072
225226#include "formats/basicdsk.h"
226227#include "formats/x1_tap.h"
227228#include "imagedev/cartslot.h"
228#include "includes/x1.h"
229229
230230#define MAIN_CLOCK XTAL_16MHz
231231#define VDP_CLOCK  XTAL_42_9545MHz
r11071r11072
246246
247247static VIDEO_START( x1 )
248248{
249   x1_state *state = machine.driver_data<x1_state>();
250   state->m_avram = auto_alloc_array(machine, UINT8, 0x800);
251   state->m_tvram = auto_alloc_array(machine, UINT8, 0x800);
252   state->m_kvram = auto_alloc_array(machine, UINT8, 0x800);
253   state->m_gfx_bitmap_ram = auto_alloc_array(machine, UINT8, 0xc000*2);
254   state->m_pal_4096 = auto_alloc_array(machine, UINT8, 0x1000*3);
249//   x1_state *state = machine.driver_data<x1_state>();
250//   state->m_avram = auto_alloc_array(machine, UINT8, 0x800);
251//   state->m_tvram = auto_alloc_array(machine, UINT8, 0x800);
252//   state->m_kvram = auto_alloc_array(machine, UINT8, 0x800);
253//   state->m_gfx_bitmap_ram = auto_alloc_array(machine, UINT8, 0xc000*2);
254//   state->m_pal_4096 = auto_alloc_array(machine, UINT8, 0x1000*3);
255255}
256256
257257static void x1_draw_pixel(running_machine &machine, bitmap_t *bitmap,int y,int x,UINT16   pen,UINT8 width,UINT8 height)
r11071r11072
17561756   else if(offset == 0x0803)                  { printf("Color image board 2 read\n"); return 0xff; } // *
17571757   else if(offset >= 0x0a00 && offset <= 0x0a07)   { printf("Stereoscopic board read %04x\n",offset); return 0xff; } // *
17581758   else if(offset == 0x0b00)                  { return x1turbo_bank_r(space,0); }
1759   else if(offset >= 0x0c00 && offset <= 0x0cff)   { printf("RS-232C read %04x\n",offset); return 0xff; } // *
1759   else if(offset >= 0x0c00 && offset <= 0x0cff)   { printf("RS-232C read %04x\n",offset); return 0; } // *
17601760   else if(offset >= 0x0d00 && offset <= 0x0dff)   { return x1_emm_r(space,offset & 0xff); } // *
17611761   else if(offset == 0x0e03)                      { return x1_rom_r(space, 0); }
17621762   else if(offset >= 0x0e80 && offset <= 0x0e81)   { return x1_kanji_r(space, offset-0xe80); }
r11071r11072
19011901   state->m_vsync = (device->machine().primary_screen->vpos() < vsync_line) ? 0x00 : 0x04;
19021902
19031903//   popmessage("%d",vsync_line);
1904//   popmessage("%d",vblank_line);
19041905
19051906   res = state->m_ram_bank | state->m_sub_obf | state->m_vsync | state->m_vdisp;
19061907
1907   //popmessage("%d",vblank_line);
1908
19091908   if(cassette_input(device->machine().device("cass")) > 0.03)
19101909      res |= 0x02;
19111910
r11071r11072
27282727   ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF )
27292728   ROM_LOAD( "ipl.x1", 0x0000, 0x1000, CRC(7b28d9de) SHA1(c4db9a6e99873808c8022afd1c50fef556a8b44d) )
27302729
2731   ROM_REGION( 0x10000, "wram", ROMREGION_ERASEFF )
2730   ROM_REGION( 0x10000, "wram", ROMREGION_ERASE00 )
27322731
27332732   ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu"
27342733   ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP )
r11071r11072
27582757   ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF )
27592758   ROM_LOAD( "ipl.rom", 0x0000, 0x1000, CRC(e70011d3) SHA1(d3395e9aeb5b8bbba7654dd471bcd8af228ee69a) )
27602759
2761   ROM_REGION( 0x10000, "wram", ROMREGION_ERASEFF )
2760   ROM_REGION( 0x10000, "wram", ROMREGION_ERASE00 )
27622761
27632762   ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu"
27642763   ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP )
r11071r11072
27922791   ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF )
27932792   ROM_LOAD( "ipl.x1t", 0x0000, 0x8000, CRC(2e8b767c) SHA1(44620f57a25f0bcac2b57ca2b0f1ebad3bf305d3) )
27942793
2795   ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASEFF )
2794   ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASE00 )
27962795
27972796   ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu"
27982797   ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP )
r11071r11072
28282827   ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF )
28292828   ROM_LOAD( "ipl.bin", 0x0000, 0x8000, CRC(112f80a2) SHA1(646cc3fb5d2d24ff4caa5167b0892a4196e9f843) )
28302829
2831   ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASEFF )
2830   ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASE00 )
28322831
28332832   ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu"
28342833   ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team