~ubuntu-branches/ubuntu/precise/mame/precise-proposed

« back to all changes in this revision

Viewing changes to src/mame/video/gtia.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2010-08-01 23:18:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100801231831-9dj2qbsynutixsoe
Tags: 0.139-0ubuntu1
* New upstream release (LP: #612070)
* debian/contrib/manpages: removed, accepted upstream
* debian/patches/:
  - deprecated_gtk_macros: removed, fixed upstream
  - missing_newline.patch: removed, fixed upstream
  - typos.patch: removed, fixed upstream
* debian/rules: new variables SYMLEVEL and DUMPSYM
* mame-tools: ldplayer removed, possibly for good (FTBFS upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#define CHECK_GRACTL    0
28
28
#define VERBOSE                 0
29
29
 
30
 
static void gtia_reset(running_machine *machine);
 
30
static void gtia_reset(running_machine &machine);
31
31
static void gtia_state(running_machine *machine);
32
32
static STATE_POSTLOAD( gtia_state_postload );
33
33
 
68
68
        memset(&gtia, 0, sizeof(gtia));
69
69
        gtia.intf = *intf;
70
70
 
71
 
        add_reset_callback(machine, gtia_reset);
 
71
        machine->add_notifier(MACHINE_NOTIFY_RESET, gtia_reset);
72
72
 
73
73
        /* state saves */
74
74
        gtia_state(machine);
146
146
 
147
147
static int is_ntsc(running_machine *machine)
148
148
{
149
 
        return ATTOSECONDS_TO_HZ(video_screen_get_frame_period(machine->primary_screen).attoseconds) > 55;
 
149
        return ATTOSECONDS_TO_HZ(machine->primary_screen->frame_period().attoseconds) > 55;
150
150
}
151
151
 
152
152
 
153
153
 
154
 
static void gtia_reset(running_machine *machine)
 
154
static void gtia_reset(running_machine &machine)
155
155
{
156
156
        int i;
157
 
        const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
 
157
        const address_space *space = cputag_get_address_space(&machine, "maincpu", ADDRESS_SPACE_PROGRAM);
158
158
 
159
159
        /* reset the GTIA read/write/helper registers */
160
160
        for (i = 0; i < 32; i++)
161
161
                atari_gtia_w(space,i,0);
162
162
    memset(&gtia.r, 0, sizeof(gtia.r));
163
 
        if (is_ntsc(machine))
 
163
        if (is_ntsc(&machine))
164
164
                gtia.r.pal = 0xff;
165
165
        else
166
166
                gtia.r.pal = 0xf1;