static void sm501_palette_write(void *opaque,

				target_phys_addr_t addr, uint32_t value)

{

    SM501State * s = (SM501State *)opaque;

    SM501_DPRINTF("sm501 palette write addr=%x, val=%x\n",

		  (int)addr, value);



    /* TODO : consider BYTE/WORD access */

    /* TODO : consider endian */



    assert(0 <= addr && addr < 0x400 * 3);

    *(uint32_t*)&s->dc_palette[addr] = value;

}

static void sm501_palette_write(void *opaque,

				target_phys_addr_t addr, uint32_t value)

{

    SM501State * s = (SM501State *)opaque;

    SM501_DPRINTF("sm501 palette write addr=%x, val=%x\n",

		  (int)addr, value);



    

    



    assert(0 <= addr && addr < 0x400 * 3);

    *(uint32_t*)&s->dc_palette[addr] = value;

}

static void FUNC_0(void *VAR_0,

				target_phys_addr_t VAR_1, uint32_t VAR_2)

{

    SM501State * s = (SM501State *)VAR_0;

    SM501_DPRINTF("sm501 palette write VAR_1=%x, val=%x\n",

		  (int)VAR_1, VAR_2);



    

    



    assert(0 <= VAR_1 && VAR_1 < 0x400 * 3);

    *(uint32_t*)&s->dc_palette[VAR_1] = VAR_2;

}

static void FUNC_0(void *VAR_0,
target_phys_addr_t VAR_1, uint32_t VAR_2)
{ SM501State * s = (SM501State *)VAR_0; SM501_DPRINTF("sm501 palette write VAR_1=%x, val=%x\n",
(int)VAR_1, VAR_2); assert(0 <= VAR_1 && VAR_1 < 0x400 * 3); *(uint32_t*)&s->dc_palette[VAR_1] = VAR_2; }