odyssey2: disable logging

This commit is contained in:
hap 2020-08-14 14:16:34 +02:00
parent e56269c933
commit c99d1da862
5 changed files with 38 additions and 54 deletions

View File

@ -1088,7 +1088,7 @@ The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM.
</software>
<software name="bees">
<description>Killer Bees! (USA)</description><!-- also "Killer Bees (Euro)[Videopac 52]"? -->
<description>Killer Bees! (USA)</description>
<year>1983</year>
<publisher>Philips</publisher>
<info name="programmer" value="Robert S. Harris" />

View File

@ -664,8 +664,6 @@ OPHANDLER( da_a )
m_a += 0x60;
m_psw |= C_FLAG;
}
else
m_psw &= ~C_FLAG;
}
OPHANDLER( dec_a ) { burn_cycles(1); m_a--; }

View File

@ -12,6 +12,9 @@
#include "screen.h"
//#define VERBOSE (LOG_GENERAL)
#include "logmacro.h"
// device type definition
DEFINE_DEVICE_TYPE(EF9340_1, ef9340_1_device, "ef9340_1", "Thomson EF9340+EF9341")
@ -46,10 +49,26 @@ void ef9340_1_device::device_start()
m_line_timer = timer_alloc(TIMER_LINE);
m_line_timer->adjust( screen().time_until_pos(0, 0), 0, screen().scan_period() );
// zerofill
m_ef9341.TA = 0;
m_ef9341.TB = 0;
m_ef9341.busy = 0;
m_ef9340.X = 0;
m_ef9340.Y = 0;
m_ef9340.Y0 = 0;
m_ef9340.R = 0;
m_ef9340.M = 0;
memset(m_ef934x_ram_a, 0, sizeof(m_ef934x_ram_a));
memset(m_ef934x_ram_b, 0, sizeof(m_ef934x_ram_b));
memset(m_ef934x_ram_b, 0, sizeof(m_ef934x_ext_char_ram));
// register our state
save_item(NAME(m_ef9341.TA));
save_item(NAME(m_ef9341.TB));
save_item(NAME(m_ef9341.busy));
save_item(NAME(m_ef9340.X));
save_item(NAME(m_ef9340.Y));
save_item(NAME(m_ef9340.Y0));
@ -62,23 +81,6 @@ void ef9340_1_device::device_start()
}
void ef9340_1_device::device_reset()
{
memset(m_ef934x_ram_a, 0, sizeof(m_ef934x_ram_a));
memset(m_ef934x_ram_b, 0, sizeof(m_ef934x_ram_b));
m_ef9340.X = 0;
m_ef9340.Y = 0;
m_ef9340.Y0 = 0;
m_ef9340.R = 0;
m_ef9340.M = 0;
m_ef9340.max_vpos = 210;
m_ef9341.TA = 0;
m_ef9341.TB = 0;
m_ef9341.busy = 0;
}
void ef9340_1_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch ( id )
@ -135,7 +137,7 @@ uint16_t ef9340_1_device::external_chargen_address(uint8_t b, uint8_t slice)
void ef9340_1_device::ef9341_write( uint8_t command, uint8_t b, uint8_t data )
{
logerror("ef9341 %s write, t%s, data %02X\n", command ? "command" : "data", b ? "B" : "A", data );
LOG("ef9341 %s write, t%s, data %02X\n", command ? "command" : "data", b ? "B" : "A", data );
if ( command )
{
@ -163,7 +165,6 @@ void ef9340_1_device::ef9341_write( uint8_t command, uint8_t b, uint8_t data )
break;
case 0xA0: /* Load R */
m_ef9340.R = m_ef9341.TA;
m_ef9340.max_vpos = ( m_ef9340.R & 0x40 ) ? 250 : 210;
break;
case 0xC0: /* Load Y0 */
m_ef9340.Y0 = m_ef9341.TA & 0x3F;
@ -225,8 +226,10 @@ void ef9340_1_device::ef9341_write( uint8_t command, uint8_t b, uint8_t data )
break;
case 0xA0: /* Read slice */
default:
fatalerror/*logerror*/("ef9341 unimplemented data action %02X\n", m_ef9340.M & 0xE0 );
fatalerror("ef9341 unimplemented data action %02X\n", m_ef9340.M & 0xE0 );
default: /* Illegal */
break;
}
m_ef9341.busy = 0;
}
@ -242,7 +245,8 @@ uint8_t ef9340_1_device::ef9341_read( uint8_t command, uint8_t b )
{
uint8_t data;
logerror("ef9341 %s read, t%s\n", command ? "command" : "data", b ? "B" : "A" );
LOG("ef9341 %s read, t%s\n", command ? "command" : "data", b ? "B" : "A" );
if ( command )
{
if ( b )
@ -279,7 +283,9 @@ void ef9340_1_device::ef9340_scanline(int vpos)
for ( int i = 0; i < 40 * 8; i++ )
m_tmp_bitmap.pix16(vpos, i) = 0;
if ( m_ef9340.R & 0x01 && vpos < m_ef9340.max_vpos )
int max_vpos = ( m_ef9340.R & 0x40 ) ? 250 : 210;
if ( m_ef9340.R & 0x01 && vpos < max_vpos )
{
int y = vpos - 0;
int y_row, slice;

View File

@ -35,7 +35,6 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
virtual const tiny_rom_entry *device_rom_region() const override;
@ -70,7 +69,6 @@ protected:
uint8_t Y0;
uint8_t R;
uint8_t M;
int max_vpos;
} m_ef9340;
uint8_t m_ef934x_ram_a[1024];

View File

@ -49,7 +49,6 @@ TODO:
- g7400 rally doesn't work, car keeps exploding
- g7400 probably has different video timing too (not same as g7000)
- g7400 graphics problems, mostly due to missing features in ef934x
- g7400 EF9341 R/W is connected to CPU A2, what happens if it is disobeyed?
***************************************************************************/
@ -105,7 +104,6 @@ protected:
void odyssey2_mem(address_map &map);
virtual void machine_start() override;
virtual void machine_reset() override;
/* constants */
static const uint8_t P1_BANK_LO_BIT = 0x01;
@ -152,7 +150,6 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_start() override;
virtual void machine_reset() override;
void p2_write(uint8_t data);
uint8_t io_read(offs_t offset);
void io_write(offs_t offset, uint8_t data);
@ -395,11 +392,6 @@ void odyssey2_state::machine_start()
}
void odyssey2_state::machine_reset()
{
}
void g7400_state::machine_start()
{
odyssey2_state::machine_start();
@ -412,17 +404,6 @@ void g7400_state::machine_start()
}
void g7400_state::machine_reset()
{
odyssey2_state::machine_reset();
for ( int i = 0; i < 8; i++ )
{
m_ic674_decode[i] = 0;
m_ic678_decode[i] = 0;
}
}
/****** External RAM ******************************/
uint8_t odyssey2_state::io_read(offs_t offset)
@ -456,8 +437,14 @@ uint8_t g7400_state::io_read(offs_t offset)
{
u8 data = odyssey2_state::io_read(offset);
if (!(m_p1 & P1_VPP_ENABLE) && offset & 4)
data &= m_ef9340_1->ef9341_read( offset & 0x02, offset & 0x01 );
if (!(m_p1 & P1_VPP_ENABLE))
{
// A2 to R/W pin
if (offset & 4)
data &= m_ef9340_1->ef9341_read( offset & 0x02, offset & 0x01 );
else
m_ef9340_1->ef9341_write( offset & 0x02, offset & 0x01, data );
}
return data;
}
@ -600,7 +587,6 @@ uint8_t odyssey2_state::bus_read()
void odyssey2_state::bus_write(uint8_t data)
{
logerror("%.6f bus written %.2x\n", machine().time().as_double(), data);
}
@ -612,7 +598,6 @@ void g7400_state::i8243_p4_w(uint8_t data)
{
// "port 4"
m_screen->update_now();
logerror("setting ef-port4 to %02x\n", data);
m_ic674_decode[1] = BIT(data,0);
m_ic674_decode[5] = BIT(data,1);
m_ic674_decode[3] = BIT(data,2);
@ -624,7 +609,6 @@ void g7400_state::i8243_p5_w(uint8_t data)
{
// "port 5"
m_screen->update_now();
logerror("setting ef-port5 to %02x\n", data);
m_ic674_decode[0] = BIT(data,0);
m_ic674_decode[4] = BIT(data,1);
m_ic674_decode[2] = BIT(data,2);
@ -636,7 +620,6 @@ void g7400_state::i8243_p6_w(uint8_t data)
{
// "port 6"
m_screen->update_now();
logerror("setting vdc-port6 to %02x\n", data);
m_ic678_decode[1] = BIT(data,0);
m_ic678_decode[5] = BIT(data,1);
m_ic678_decode[3] = BIT(data,2);
@ -648,7 +631,6 @@ void g7400_state::i8243_p7_w(uint8_t data)
{
// "port 7"
m_screen->update_now();
logerror("setting vdc-port7 to %02x\n", data);
m_ic678_decode[0] = BIT(data,0);
m_ic678_decode[4] = BIT(data,1);
m_ic678_decode[2] = BIT(data,2);