|
How to call DECLARE_WRITE8_MEMBER(duart_txa); at output.c
#324707 - 04/15/14 09:43 AM
|
|
|
CPU i8031 system. I can call "output.c"'s fuctions output_set_lamp_value(...) output_set_digit_value(...) etc in my game driver.
But how output_xxxx(...) callback in my game driver like:
DECLARE_WRITE8_MEMBER(duart_txa);
WRITE8_MEMBER(bigmario_state::duart_txa) { //printf("bigmario_state::duart_txa=%2X\n",data); m_serial_data_in = data;
m_maincpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE); m_maincpu->set_input_line(MCS51_RX_LINE, CLEAR_LINE); };
|
|
|
|
Re: How to call DECLARE_WRITE8_MEMBER(duart_txa); at output.c
[Re: lxd]
#324715 - 04/15/14 11:26 AM
|
|
|
running_machine &machine
How can I from machine get my game driver object?
class bigmario_state : public driver_device
|
|
|
|
Re: How to call DECLARE_WRITE8_MEMBER(duart_txa); at output.c
[Re: lxd]
#324724 - 04/15/14 02:43 PM
|
|
|
I found a way. That is void bigmario_state::machine_start()
|
|
|
|
Re: How to call DECLARE_WRITE8_MEMBER(duart_txa); at output.c
[Re: lxd]
#324729 - 04/15/14 04:39 PM
|
|
|
> I found a way. That is > void bigmario_state::machine_start()
nope. every class can invoke machine by using machine() , machine_start() is used for completely different things from the machine you retrieve the driver state, and then you call state->duart_txa(space, offset, data)
also, when you have a new driver working, you are welcome to submit it for official inclusion (with proper credit, of course)
|
|
|
|
Re: How to call DECLARE_WRITE8_MEMBER(duart_txa); at output.c
[Re: etabeta]
#324749 - 04/15/14 09:28 PM
|
|
|
use "delegate" in void bigmario_state::machine_start() then out.c can callback WRITE8_MEMBER(bigmario_state::duart_txa)
I have done it now. IT's work fine.
The first parameter is machine.firstcpu->space() for ATTR_UNUSED address_space &space
Thank you tell me it.
|
|
|