@@ -259,20 +259,19 @@ class nwktr_state : public driver_device
259
259
m_audiocpu (*this , " audiocpu" ),
260
260
m_dsp (*this , " dsp%u" , 1U ),
261
261
m_k056800 (*this , " k056800" ),
262
- m_k001604 (*this , " k001604_%u " , 1U ),
262
+ m_k001604 (*this , " k001604 " ),
263
263
m_konppc (*this , " konppc" ),
264
264
m_adc12138 (*this , " adc12138" ),
265
265
m_voodoo (*this , " voodoo%u" , 0U ),
266
- m_palette (*this , " palette%u " , 1U ),
266
+ m_palette (*this , " palette" ),
267
267
m_sharc_dataram (*this , " sharc%u_dataram" , 0U ),
268
268
m_jvs_host (*this , " jvs_host" ),
269
269
m_gn676_lan (*this , " gn676_lan" ),
270
270
m_cgboard_bank (*this , " cgboard_%u_bank" , 0U ),
271
271
m_in (*this , " IN%u" , 0U ),
272
272
m_dsw (*this , " DSW" ),
273
273
m_analog (*this , " ANALOG%u" , 1U ),
274
- m_pcb_digit (*this , " pcbdigit%u" , 0U ),
275
- m_cg_view (*this , " cg_view" )
274
+ m_pcb_digit (*this , " pcbdigit%u" , 0U )
276
275
{ }
277
276
278
277
void nwktr (machine_config &config);
@@ -296,11 +295,11 @@ class nwktr_state : public driver_device
296
295
required_device<cpu_device> m_audiocpu;
297
296
required_device_array<adsp21062_device, 2 > m_dsp;
298
297
required_device<k056800_device> m_k056800;
299
- required_device_array <k001604_device, 2 > m_k001604;
298
+ required_device <k001604_device> m_k001604;
300
299
required_device<konppc_device> m_konppc;
301
300
required_device<adc12138_device> m_adc12138;
302
301
required_device_array<generic_voodoo_device, 2 > m_voodoo;
303
- required_device_array <palette_device, 2 > m_palette;
302
+ required_device <palette_device> m_palette;
304
303
optional_shared_ptr_array<uint32_t , 2 > m_sharc_dataram;
305
304
required_device<konppc_jvs_host_device> m_jvs_host;
306
305
required_device<konami_gn676_lan_device> m_gn676_lan;
@@ -309,13 +308,13 @@ class nwktr_state : public driver_device
309
308
required_ioport m_dsw;
310
309
required_ioport_array<5 > m_analog;
311
310
output_finder<2 > m_pcb_digit;
312
- memory_view m_cg_view;
313
311
314
312
emu_timer *m_sound_irq_timer = nullptr ;
315
313
bool m_exrgb = false ;
316
314
317
315
uint8_t sysreg_r (offs_t offset);
318
316
void sysreg_w (offs_t offset, uint8_t data);
317
+ void cg_view_select (int view);
319
318
void soundtimer_en_w (uint16_t data);
320
319
void soundtimer_count_w (uint16_t data);
321
320
double adc12138_input_callback (uint8_t input);
@@ -332,12 +331,12 @@ class nwktr_state : public driver_device
332
331
333
332
uint32_t nwktr_state::screen_update (screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
334
333
{
335
- bitmap.fill (m_palette[ 0 ] ->pen (0 ), cliprect);
334
+ bitmap.fill (m_palette->pen (0 ), cliprect);
336
335
337
336
int const board = m_exrgb ? 1 : 0 ;
338
337
339
338
m_voodoo[board]->update (bitmap, cliprect);
340
- m_k001604[ 0 ] ->draw_front_layer (screen, bitmap, cliprect); // K001604 on slave board doesn't seem to output anything. Bug or intended?
339
+ m_k001604->draw_front_layer (screen, bitmap, cliprect);
341
340
342
341
return 0 ;
343
342
}
@@ -417,20 +416,25 @@ void nwktr_state::sysreg_w(offs_t offset, uint8_t data)
417
416
418
417
m_konppc->set_cgboard_id ((data >> 4 ) & 0x3 );
419
418
420
- // Racing Jam sets CG board ID to 2 when writing to the tilemap chip.
421
- // This could mean broadcast to both CG boards?
419
+ /*
420
+ Racing Jam sets both EXID bits when writing to the tilemap chip before POST. This means
421
+ writing to both CG boards at the tilemap chip simultaneously. However, broadcasting
422
+ read/write handlers currently isn't supported and likely will never be for preventing
423
+ possible race conditions. Due to the way Konami configured this hardware in such an
424
+ illegal manner, we'll cheat by only using one K001604 instead to show all the tilemap
425
+ graphics can properly display during POST (and pass "both" tilemap IC tests).
426
+ */
422
427
423
- m_exrgb = BIT ( data, 0 ) ; // Select which CG Board outputs signal
428
+ // cg_view_select(( data >> 4) & 0x3) ; This normally selects which CG board to read/write to (see above note)
424
429
425
- m_cg_view. select (m_konppc-> get_cgboard_id () ? 1 : 0 );
430
+ m_exrgb = BIT (data, 0 ); // Select which CG Board outputs signal
426
431
break ;
427
432
428
433
default :
429
434
break ;
430
435
}
431
436
}
432
437
433
-
434
438
/* ****************************************************************************/
435
439
436
440
TIMER_CALLBACK_MEMBER (nwktr_state::sound_irq)
@@ -479,18 +483,19 @@ void nwktr_state::machine_start()
479
483
save_item (NAME (m_exrgb));
480
484
}
481
485
486
+ void nwktr_state::machine_reset ()
487
+ {
488
+ m_dsp[0 ]->set_input_line (INPUT_LINE_RESET, ASSERT_LINE);
489
+ m_dsp[1 ]->set_input_line (INPUT_LINE_RESET, ASSERT_LINE);
490
+ }
491
+
482
492
void nwktr_state::ppc_map (address_map &map)
483
493
{
484
494
map (0x00000000 , 0x003fffff ).ram ().share (m_work_ram);
485
- map (0x74000000 , 0x7407ffff ).view (m_cg_view);
486
- m_cg_view[0 ](0x74000000 , 0x740000ff ).rw (m_k001604[0 ], FUNC (k001604_device::reg_r), FUNC (k001604_device::reg_w));
487
- m_cg_view[0 ](0x74010000 , 0x7401ffff ).ram ().w (m_palette[0 ], FUNC (palette_device::write32)).share (" palette1" );
488
- m_cg_view[0 ](0x74020000 , 0x7403ffff ).rw (m_k001604[0 ], FUNC (k001604_device::tile_r), FUNC (k001604_device::tile_w));
489
- m_cg_view[0 ](0x74040000 , 0x7407ffff ).rw (m_k001604[0 ], FUNC (k001604_device::char_r), FUNC (k001604_device::char_w));
490
- m_cg_view[1 ](0x74000000 , 0x740000ff ).rw (m_k001604[1 ], FUNC (k001604_device::reg_r), FUNC (k001604_device::reg_w));
491
- m_cg_view[1 ](0x74010000 , 0x7401ffff ).ram ().w (m_palette[1 ], FUNC (palette_device::write32)).share (" palette2" );
492
- m_cg_view[1 ](0x74020000 , 0x7403ffff ).rw (m_k001604[1 ], FUNC (k001604_device::tile_r), FUNC (k001604_device::tile_w));
493
- m_cg_view[1 ](0x74040000 , 0x7407ffff ).rw (m_k001604[1 ], FUNC (k001604_device::char_r), FUNC (k001604_device::char_w));
495
+ map (0x74000000 , 0x740000ff ).rw (m_k001604, FUNC (k001604_device::reg_r), FUNC (k001604_device::reg_w));
496
+ map (0x74010000 , 0x7401ffff ).ram ().w (m_palette, FUNC (palette_device::write32)).share (" palette" );
497
+ map (0x74020000 , 0x7403ffff ).rw (m_k001604, FUNC (k001604_device::tile_r), FUNC (k001604_device::tile_w));
498
+ map (0x74040000 , 0x7407ffff ).rw (m_k001604, FUNC (k001604_device::char_r), FUNC (k001604_device::char_w));
494
499
map (0x78000000 , 0x7800ffff ).rw (m_konppc, FUNC (konppc_device::cgboard_dsp_shared_r_ppc), FUNC (konppc_device::cgboard_dsp_shared_w_ppc));
495
500
map (0x780c0000 , 0x780c0003 ).rw (m_konppc, FUNC (konppc_device::cgboard_dsp_comm_r_ppc), FUNC (konppc_device::cgboard_dsp_comm_w_ppc));
496
501
map (0x7d000000 , 0x7d00ffff ).r (FUNC (nwktr_state::sysreg_r));
@@ -636,12 +641,6 @@ double nwktr_state::adc12138_input_callback(uint8_t input)
636
641
return (double )(value) / 4095.0 ;
637
642
}
638
643
639
- void nwktr_state::machine_reset ()
640
- {
641
- m_dsp[0 ]->set_input_line (INPUT_LINE_RESET, ASSERT_LINE);
642
- m_dsp[1 ]->set_input_line (INPUT_LINE_RESET, ASSERT_LINE);
643
- }
644
-
645
644
void nwktr_state::nwktr (machine_config &config)
646
645
{
647
646
// basic machine hardware
@@ -693,14 +692,10 @@ void nwktr_state::nwktr(machine_config &config)
693
692
screen.set_raw (XTAL (64'000'000 ) / 4 , 644 , 44 , 44 + 512 , 450 , 31 , 31 + 400 );
694
693
screen.set_screen_update (FUNC (nwktr_state::screen_update));
695
694
696
- PALETTE (config, m_palette[0 ]).set_format (4 , raw_to_rgb_converter::standard_rgb_decoder<5 ,5 ,5 , 10 ,5 ,0 >, 65536 / 4 );
697
- PALETTE (config, m_palette[1 ]).set_format (4 , raw_to_rgb_converter::standard_rgb_decoder<5 ,5 ,5 , 10 ,5 ,0 >, 65536 / 4 );
698
-
699
- K001604 (config, m_k001604[0 ], 0 );
700
- m_k001604[0 ]->set_palette (m_palette[0 ]);
695
+ PALETTE (config, m_palette).set_format (4 , raw_to_rgb_converter::standard_rgb_decoder<5 ,5 ,5 , 10 ,5 ,0 >, 65536 / 4 );
701
696
702
- K001604 (config, m_k001604[ 1 ] , 0 );
703
- m_k001604[ 1 ] ->set_palette (m_palette[ 1 ]);
697
+ K001604 (config, m_k001604, 0 );
698
+ m_k001604->set_palette (m_palette); // see sysreg_w case 7 for why we're only use one K001604 instead of two
704
699
705
700
SPEAKER (config, " lspeaker" ).front_left ();
706
701
SPEAKER (config, " rspeaker" ).front_right ();
0 commit comments