trunk/src/mame/drivers/galdrvr.c
| r23633 | r23634 | |
| 6904 | 6904 | *************************************/ |
| 6905 | 6905 | |
| 6906 | 6906 | /* basic galaxian hardware */ |
| 6907 | | GAME( 1979, galaxian, 0, galaxian, galaxian, galaxian_state, galaxian, ROT90, "Namco", "Galaxian (Namco set 1)", GAME_SUPPORTS_SAVE ) |
| 6908 | | GAME( 1979, galaxiana, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "Namco", "Galaxian (Namco set 2)", GAME_SUPPORTS_SAVE ) |
| 6909 | | GAME( 1979, galaxianm, galaxian, galaxian, galaxian, galaxian_state, galaxian, ROT90, "Namco (Midway license)", "Galaxian (Midway set 1)", GAME_SUPPORTS_SAVE ) |
| 6910 | | GAME( 1979, galaxianmo, galaxian, galaxian, galaxian, galaxian_state, galaxian, ROT90, "Namco (Midway license)", "Galaxian (Midway set 2)", GAME_SUPPORTS_SAVE ) |
| 6911 | | GAME( 1979, galaxiant, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "Namco (Taito license)", "Galaxian (Taito)", GAME_SUPPORTS_SAVE ) |
| 6907 | GAME( 1979, galaxian, 0, galaxian, galaxian, galaxian_state, galaxiann, ROT90, "Namco", "Galaxian (Namco set 1)", GAME_SUPPORTS_SAVE ) |
| 6908 | GAME( 1979, galaxiana, galaxian, galaxian, superg, galaxian_state, galaxiann, ROT90, "Namco", "Galaxian (Namco set 2)", GAME_SUPPORTS_SAVE ) |
| 6909 | GAME( 1979, galaxiant, galaxian, galaxian, superg, galaxian_state, galaxiann, ROT90, "Namco (Taito license)", "Galaxian (Taito)", GAME_SUPPORTS_SAVE ) |
| 6910 | GAME( 1979, galaxianm, galaxian, galaxian, galaxian, galaxian_state, galaxian, ROT90, "Namco (Midway license)", "Galaxian (Midway set 1)", GAME_SUPPORTS_SAVE ) |
| 6911 | GAME( 1979, galaxianmo, galaxian, galaxian, galaxian, galaxian_state, galaxian, ROT90, "Namco (Midway license)", "Galaxian (Midway set 2)", GAME_SUPPORTS_SAVE ) |
| 6912 | 6912 | |
| 6913 | 6913 | /* straight Galaxian ripoffs on basic galaxian hardware */ |
| 6914 | 6914 | GAME( 1979, moonaln, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "Namco / Nichibutsu (Karateco license?)", "Moon Alien", GAME_SUPPORTS_SAVE ) // or bootleg? |
trunk/src/mame/drivers/galaxian.c
| r23633 | r23634 | |
| 2759 | 2759 | { |
| 2760 | 2760 | m_irq_enabled = 0; |
| 2761 | 2761 | m_irq_line = INPUT_LINE_NMI; |
| 2762 | m_color_resnet_type = GALAXIAN_RESNET_TYPE_MIDWAY; |
| 2762 | 2763 | m_numspritegens = 1; |
| 2763 | 2764 | m_bullets_base = 0x60; |
| 2764 | 2765 | m_sprites_base = 0x40; |
| r23633 | r23634 | |
| 2794 | 2795 | } |
| 2795 | 2796 | |
| 2796 | 2797 | |
| 2798 | DRIVER_INIT_MEMBER(galaxian_state,galaxiann) |
| 2799 | { |
| 2800 | DRIVER_INIT_CALL(galaxian); |
| 2801 | |
| 2802 | /* Namco PCB had a slightly different color prom resnet */ |
| 2803 | m_color_resnet_type = GALAXIAN_RESNET_TYPE_NAMCO; |
| 2804 | } |
| 2805 | |
| 2806 | |
| 2797 | 2807 | DRIVER_INIT_MEMBER(galaxian_state,nolock) |
| 2798 | 2808 | { |
| 2799 | 2809 | address_space &space = m_maincpu->space(AS_PROGRAM); |
| r23633 | r23634 | |
| 3300 | 3310 | |
| 3301 | 3311 | /* video extensions */ |
| 3302 | 3312 | common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, NULL); |
| 3313 | |
| 3314 | /* Namco PCB had a slightly different color prom resnet */ |
| 3315 | m_color_resnet_type = GALAXIAN_RESNET_TYPE_NAMCO; |
| 3303 | 3316 | |
| 3304 | 3317 | /* disable the stars */ |
| 3305 | 3318 | space.unmap_write(0xb004, 0xb004, 0, 0x07f8); |
trunk/src/mame/video/galaxian.c
| r23633 | r23634 | |
| 236 | 236 | void galaxian_state::palette_init() |
| 237 | 237 | { |
| 238 | 238 | const UINT8 *color_prom = memregion("proms")->base(); |
| 239 | | static const int rgb_resistances[3] = { 1000, 470, 220 }; |
| 239 | int rgb_resistances[3]; |
| 240 | 240 | double rweights[3], gweights[3], bweights[2]; |
| 241 | | int i, minval, midval, maxval, len; |
| 241 | int i, minval, midval, maxval, maxres, len; |
| 242 | 242 | UINT8 starmap[4]; |
| 243 | 243 | |
| 244 | 244 | /* |
| r23633 | r23634 | |
| 267 | 267 | of the main game would be very low to allow for all the oversaturation |
| 268 | 268 | of the stars and shells/missiles. |
| 269 | 269 | */ |
| 270 | |
| 271 | // official Namco PCB used 330 ohm resistors instead of the 220 ohm ones |
| 272 | switch (m_color_resnet_type) |
| 273 | { |
| 274 | case GALAXIAN_RESNET_TYPE_NAMCO: |
| 275 | rgb_resistances[0] = 1000; |
| 276 | rgb_resistances[1] = 470; |
| 277 | rgb_resistances[2] = 330; |
| 278 | break; |
| 279 | |
| 280 | default: |
| 281 | rgb_resistances[0] = 1000; |
| 282 | rgb_resistances[1] = 470; |
| 283 | rgb_resistances[2] = 220; |
| 284 | break; |
| 285 | } |
| 286 | |
| 270 | 287 | compute_resistor_weights(0, RGB_MAXIMUM, -1.0, |
| 271 | 288 | 3, &rgb_resistances[0], rweights, 470, 0, |
| 272 | 289 | 3, &rgb_resistances[0], gweights, 470, 0, |
| r23633 | r23634 | |
| 313 | 330 | Since we can't saturate that high, we instead approximate this |
| 314 | 331 | by compressing the values proportionally into the 194->255 range. |
| 315 | 332 | */ |
| 316 | | minval = RGB_MAXIMUM * 130 / 150; |
| 317 | | midval = RGB_MAXIMUM * 130 / 100; |
| 318 | | maxval = RGB_MAXIMUM * 130 / 60; |
| 333 | maxres = 1.0 / (1.0/rgb_resistances[0] + 1.0/rgb_resistances[1] + 1.0/rgb_resistances[2]); |
| 334 | minval = RGB_MAXIMUM * maxres / 150; |
| 335 | midval = RGB_MAXIMUM * maxres / 100; |
| 336 | maxval = RGB_MAXIMUM * maxres / 60; |
| 319 | 337 | |
| 320 | 338 | /* compute the values for each of 4 possible star values */ |
| 321 | 339 | starmap[0] = 0; |
trunk/src/mame/includes/galaxian.h
| r23633 | r23634 | |
| 28 | 28 | #define GALAXIAN_VBEND (16) |
| 29 | 29 | #define GALAXIAN_VBSTART (224+16) |
| 30 | 30 | |
| 31 | enum |
| 32 | { |
| 33 | GALAXIAN_RESNET_TYPE_MIDWAY, |
| 34 | GALAXIAN_RESNET_TYPE_NAMCO |
| 35 | }; |
| 31 | 36 | |
| 37 | |
| 32 | 38 | class galaxian_state : public driver_device |
| 33 | 39 | { |
| 34 | 40 | public: |
| r23633 | r23634 | |
| 53 | 59 | int m_bullets_base; |
| 54 | 60 | int m_sprites_base; |
| 55 | 61 | int m_numspritegens; |
| 62 | int m_color_resnet_type; |
| 56 | 63 | int m_counter_74ls161[2]; |
| 57 | 64 | int m_direction[2]; |
| 58 | 65 | UINT8 m_gmgalax_selected_game; |
| r23633 | r23634 | |
| 182 | 189 | DECLARE_WRITE8_MEMBER(kingball_dac_w); |
| 183 | 190 | DECLARE_WRITE8_MEMBER(moonwar_port_select_w); |
| 184 | 191 | DECLARE_DRIVER_INIT(galaxian); |
| 192 | DECLARE_DRIVER_INIT(galaxiann); |
| 185 | 193 | DECLARE_DRIVER_INIT(nolock); |
| 186 | 194 | DECLARE_DRIVER_INIT(azurian); |
| 187 | 195 | DECLARE_DRIVER_INIT(gmgalax); |