Revision a8aec295

b/hw/audio/adlib.c
283 283
    AUD_remove_card (&s->card);
284 284
}
285 285

  
286
static MemoryRegionPortio adlib_portio_list[] = {
287
    { 0x388, 4, 1, .read = adlib_read, .write = adlib_write, },
288
    { 0, 4, 1, .read = adlib_read, .write = adlib_write, },
289
    { 0, 2, 1, .read = adlib_read, .write = adlib_write, },
290
    PORTIO_END_OF_LIST(),
291
};
292

  
286 293
static void adlib_realizefn (DeviceState *dev, Error **errp)
287 294
{
288 295
    AdlibState *s = ADLIB(dev);
296
    PortioList *port_list = g_new(PortioList, 1);
289 297
    struct audsettings as;
290 298

  
291 299
    if (glob_adlib) {
......
339 347
    s->samples = AUD_get_buffer_size_out (s->voice) >> SHIFT;
340 348
    s->mixbuf = g_malloc0 (s->samples << SHIFT);
341 349

  
342
    register_ioport_read (0x388, 4, 1, adlib_read, s);
343
    register_ioport_write (0x388, 4, 1, adlib_write, s);
344

  
345
    register_ioport_read (s->port, 4, 1, adlib_read, s);
346
    register_ioport_write (s->port, 4, 1, adlib_write, s);
347

  
348
    register_ioport_read (s->port + 8, 2, 1, adlib_read, s);
349
    register_ioport_write (s->port + 8, 2, 1, adlib_write, s);
350
    adlib_portio_list[1].offset = s->port;
351
    adlib_portio_list[2].offset = s->port + 8;
352
    portio_list_init (port_list, adlib_portio_list, s, "adlib");
353
    portio_list_add (port_list, isa_address_space_io(&s->parent_obj), 0);
350 354
}
351 355

  
352 356
static Property adlib_properties[] = {

Also available in: Unified diff