Skip to content

Commit 6f03755

Browse files
author
mamedev
committed
MAME 0.122
1 parent 88b1c53 commit 6f03755

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1721
-1135
lines changed

docs/newvideo.txt

+19-19
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ how you should configure MAME with the new rendering system in place.
66

77
The New Video Landscape
88

9-
Since its inception 9 years ago, MAMEs video system has defaulted to
9+
Since its inception 9 years ago, MAME's video system has defaulted to
1010
a mode where it tries to change resolutions on you. And since the
1111
first port of the core to Windows 5 years ago, it has defaulted to
1212
using your graphics card to stretch the video to that resolution.
1313

14-
Im sure a lot of you out there have taken a lot of time to tweak the
14+
I'm sure a lot of you out there have taken a lot of time to tweak the
1515
current set of video options to make them work the way you like. But
1616
every once in a while, you need to take a step back and re-evaluate
1717
the situation. The current video system has been in place for 5 years
1818
now without much substantial change. And with the recent rewrite,
19-
youre almost certainly going to want to rethink the way you have
19+
you're almost certainly going to want to rethink the way you have
2020
things configured.
2121

2222
At the highest level, there are really three different ways you can
@@ -28,7 +28,7 @@ you can tweak with the settings to figure out what works best.
2828
Category 1: Bells and whistles. People who fall into this category
2929
would include anyone with a modern system and a decent video card
3030
(decent in this context means at least 16MB of VRAM and built in the
31-
last 5 years or so � were not talking cutting edge here). Any decent
31+
last 5 years or so � we're not talking cutting edge here). Any decent
3232
video card will be able to render the simple MAME graphics at pretty
3333
much any resolution without breaking a sweat. Configure your desktop
3434
to the video mode you want (preferably something high like 1024�768
@@ -37,7 +37,7 @@ fixed-mode LCD, in which case just match what your LCD panel is),
3737
and tell MAME to leave the resolution alone. In this day and age,
3838
there is little reason to switch resolutions at all, unless you
3939
fall into Category 3, below. In this mode, you will have full access
40-
to artwork options, and youll get your artwork scaled to full
40+
to artwork options, and you'll get your artwork scaled to full
4141
resolution and with full alpha blending effects. Vector games will
4242
look crisp, you can use decent fonts, and you can see a whole lot
4343
more of the world when using the graphics/tilemap viewer. This mode
@@ -47,28 +47,28 @@ uses Direct3D, so you should configure yourself like this:
4747

4848
The -noswitchres option tells MAME to just run at the current
4949
resolution. Although you can let MAME pick a resolution for you, it
50-
doesnt really make much sense in D3D mode, and in fact I may even
50+
doesn't really make much sense in D3D mode, and in fact I may even
5151
remove that feature altogether. To avoid tearing artifacts, I
5252
recommend using the -triplebuffer option as well. Just make sure your
53-
monitors refresh rate is higher than the game you are running. If
53+
monitor's refresh rate is higher than the game you are running. If
5454
you dislike the blurry look of the graphics, you can specify the
5555
-nofilter option to disable bilinear filtering, though that will
5656
produce blocky artifacts. Alternatively, you can use the -prescale
5757
option which is described at the end of this article.
5858

5959

60-
Category 2: Like the old days. I really didnt even want to support
60+
Category 2: Like the old days. I really didn't even want to support
6161
this mode at all, but certain vocal MAMEdevs would have skinned me
6262
alive otherwise. People who fall into this category include those who
6363
have weak systems that worked fine with previous versions of MAME,
64-
but who dont run well with Direct3D rendering. (Note that just
64+
but who don't run well with Direct3D rendering. (Note that just
6565
because Space Invaders runs unthrottled at 2000fps with DirectDraw
66-
and 1000fps with Direct3D doesnt mean that Direct3D is going to be
67-
a serious issue when playing at a regular 60fps, so if youre unsure,
66+
and 1000fps with Direct3D doesn't mean that Direct3D is going to be
67+
a serious issue when playing at a regular 60fps, so if you're unsure,
6868
give the Direct3D route a try for a while.) In this mode, MAME will
69-
draw the game screen and artwork at the games resolution, just like
69+
draw the game screen and artwork at the game's resolution, just like
7070
it did in MAME 0.106 and earlier; however, some artwork options,
71-
such as -artcrop, wont work as you might expect, and some alpha
71+
such as -artcrop, won't work as you might expect, and some alpha
7272
blending artwork modes (specifically overlays) will operate with a
7373
performance penality. MAME will then use your video card to stretch
7474
the video to the proper aspect ratio.
@@ -79,9 +79,9 @@ The -switchres is optional here. If your video card is really ancient
7979
and struggles expanding the screen to fit your desktop resolution,
8080
you might want to turn it on. Again, to avoid tearing artifacts, I
8181
recommend using the -triplebuffer option as well, but make sure your
82-
monitors refresh rate is higher than the game you are running
82+
monitor's refresh rate is higher than the game you are running
8383
(-switchres will do that for you if you use it). If your video card
84-
produces blurry pixels which you dont like, try the -prescale option
84+
produces blurry pixels which you don't like, try the -prescale option
8585
described at the end of this article.
8686

8787

@@ -90,15 +90,15 @@ generally built their own cabinets and set them up with a CRT display
9090
where they have several dozen carefully hand-tweaked video modes that
9191
approximate the original video modes the games ran at. They want MAME
9292
to pick that hand-tweaked mode and use it, drawing one pixel on the
93-
screen for each pixel in the original game. They dont give a whit
93+
screen for each pixel in the original game. They don't give a whit
9494
about artwork or anything other than the raw pixels going to the
9595
right place. Fortunately, you can still configure MAME for this case
9696
as well:
9797

9898
-video ddraw -nohwstretch -switchres [-triplebuffer]
9999

100100
Obviously in this case, the -switchres is required. You also want to
101-
disable hardware stretching, otherwise you wont get that perfect
101+
disable hardware stretching, otherwise you won't get that "perfect"
102102
1:1 pixel mapping. Triple buffering may or may not help.
103103

104104

@@ -136,11 +136,11 @@ If you are running in Category 3 (-video ddraw -nohwstretch), then
136136
factor times the raw screen resolution, and then MAME will, in
137137
software, compose the screen graphics at the specified scale factor.
138138
This has all the advantages of the Category 2 case, except that since
139-
there wasnt any pixel blurring to begin with, there is no additional
139+
there wasn't any pixel blurring to begin with, there is no additional
140140
crispness that comes about as a result.
141141

142142
Finally, you may be wondering about effects (and yes, scanlines are
143-
an effect). Effects are no longer hard-coded into the system.
143+
an "effect"). Effects are no longer hard-coded into the system.
144144
Rather, you can provide a PNG file in the artwork directory that will
145145
be loaded and overlaid on top of screen bitmaps. See the description
146146
of -effect in windows.txt for more details.

src/emu/cpu/m68000/m68k.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* ======================================================================== */
77
/*
88
* MUSASHI
9-
* Version 3.31
9+
* Version 3.32
1010
*
1111
* A portable Motorola M680x0 processor emulation engine.
1212
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
@@ -15,7 +15,7 @@
1515
* copyright notice remains unaltered in the source code and any binary files
1616
* containing this code in compiled form.
1717
*
18-
* All other lisencing terms must be negotiated with the author
18+
* All other licensing terms must be negotiated with the author
1919
* (Karl Stenerud).
2020
*
2121
* The latest version of this code can be obtained at:

src/emu/cpu/m68000/m68k_in.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ must fix:
88
/* ======================================================================== */
99
/*
1010
* MUSASHI
11-
* Version 3.31
11+
* Version 3.32
1212
*
1313
* A portable Motorola M680x0 processor emulation engine.
1414
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
@@ -17,7 +17,7 @@ must fix:
1717
* copyright notice remains unaltered in the source code and any binary files
1818
* containing this code in compiled form.
1919
*
20-
* All other lisencing terms must be negotiated with the author
20+
* All other licensing terms must be negotiated with the author
2121
* (Karl Stenerud).
2222
*
2323
* The latest version of this code can be obtained at:
@@ -141,7 +141,7 @@ typedef struct
141141

142142

143143
/* Opcode handler table */
144-
static opcode_handler_struct m68k_opcode_handler_table[] =
144+
static const opcode_handler_struct m68k_opcode_handler_table[] =
145145
{
146146
/* function mask match 000 010 020 040 */
147147

@@ -157,7 +157,7 @@ M68KMAKE_TABLE_FOOTER
157157
/* Build the opcode handler jump table */
158158
void m68ki_build_opcode_table(void)
159159
{
160-
opcode_handler_struct *ostruct;
160+
const opcode_handler_struct *ostruct;
161161
int instr;
162162
int i;
163163
int j;

src/emu/cpu/m68000/m68kconf.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* ======================================================================== */
44
/*
55
* MUSASHI
6-
* Version 3.31
6+
* Version 3.32
77
*
88
* A portable Motorola M680x0 processor emulation engine.
99
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
@@ -12,7 +12,7 @@
1212
* copyright notice remains unaltered in the source code and any binary files
1313
* containing this code in compiled form.
1414
*
15-
* All other lisencing terms must be negotiated with the author
15+
* All other licensing terms must be negotiated with the author
1616
* (Karl Stenerud).
1717
*
1818
* The latest version of this code can be obtained at:

src/emu/cpu/m68000/m68kcpu.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/* ======================================================================== */
44

55
#if 0
6-
static const char* copyright_notice =
6+
static const char copyright_notice[] =
77
"MUSASHI\n"
8-
"Version 3.31 (2007-07-09)\n"
8+
"Version 3.32 (2007-12-15)\n"
99
"A portable Motorola M680x0 processor emulation engine.\n"
1010
"Copyright 1998-2007 Karl Stenerud. All rights reserved.\n"
1111
"\n"
1212
"This code may be freely used for non-commercial purpooses as long as this\n"
1313
"copyright notice remains unaltered in the source code and any binary files\n"
1414
"containing this code in compiled form.\n"
1515
"\n"
16-
"All other lisencing terms must be negotiated with the author\n"
16+
"All other licensing terms must be negotiated with the author\n"
1717
"(Karl Stenerud).\n"
1818
"\n"
1919
"The latest version of this code can be obtained at:\n"
@@ -49,7 +49,7 @@ uint m68ki_tracing = 0;
4949
uint m68ki_address_space;
5050

5151
#ifdef M68K_LOG_ENABLE
52-
const char* m68ki_cpu_names[] =
52+
const char *const m68ki_cpu_names[] =
5353
{
5454
"Invalid CPU",
5555
"M68000",
@@ -83,7 +83,7 @@ uint m68ki_aerr_write_mode;
8383
uint m68ki_aerr_fc;
8484

8585
/* Used by shift & rotate instructions */
86-
uint8 m68ki_shift_8_table[65] =
86+
const uint8 m68ki_shift_8_table[65] =
8787
{
8888
0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff,
8989
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
@@ -92,7 +92,7 @@ uint8 m68ki_shift_8_table[65] =
9292
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
9393
0xff, 0xff, 0xff, 0xff, 0xff
9494
};
95-
uint16 m68ki_shift_16_table[65] =
95+
const uint16 m68ki_shift_16_table[65] =
9696
{
9797
0x0000, 0x8000, 0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00,
9898
0xff80, 0xffc0, 0xffe0, 0xfff0, 0xfff8, 0xfffc, 0xfffe, 0xffff, 0xffff,
@@ -103,7 +103,7 @@ uint16 m68ki_shift_16_table[65] =
103103
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
104104
0xffff, 0xffff
105105
};
106-
uint m68ki_shift_32_table[65] =
106+
const uint m68ki_shift_32_table[65] =
107107
{
108108
0x00000000, 0x80000000, 0xc0000000, 0xe0000000, 0xf0000000, 0xf8000000,
109109
0xfc000000, 0xfe000000, 0xff000000, 0xff800000, 0xffc00000, 0xffe00000,
@@ -122,7 +122,7 @@ uint m68ki_shift_32_table[65] =
122122
/* Number of clock cycles to use for exception processing.
123123
* I used 4 for any vectors that are undocumented for processing times.
124124
*/
125-
uint8 m68ki_exception_cycle_table[4][256] =
125+
const uint8 m68ki_exception_cycle_table[4][256] =
126126
{
127127
{ /* 000 */
128128
4, /* 0: Reset - Initial Stack Pointer */
@@ -418,7 +418,7 @@ uint8 m68ki_exception_cycle_table[4][256] =
418418
}
419419
};
420420

421-
uint8 m68ki_ea_idx_cycle_table[64] =
421+
const uint8 m68ki_ea_idx_cycle_table[64] =
422422
{
423423
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
424424
0, /* ..01.000 no memory indirect, base NULL */

src/emu/cpu/m68000/m68kcpu.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/* ======================================================================== */
55
/*
66
* MUSASHI
7-
* Version 3.31
7+
* Version 3.32
88
*
99
* A portable Motorola M680x0 processor emulation engine.
1010
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
@@ -13,7 +13,7 @@
1313
* copyright notice remains unaltered in the source code and any binary files
1414
* containing this code in compiled form.
1515
*
16-
* All other lisencing terms must be negotiated with the author
16+
* All other licensing terms must be negotiated with the author
1717
* (Karl Stenerud).
1818
*
1919
* The latest version of this code can be obtained at:
@@ -591,7 +591,7 @@
591591
#if M68K_LOG_ENABLE
592592
#include <stdio.h>
593593
extern FILE* M68K_LOG_FILEHANDLE
594-
extern char* m68ki_cpu_names[];
594+
extern const char *const m68ki_cpu_names[];
595595

596596
#define M68K_DO_LOG(A) if(M68K_LOG_FILEHANDLE) fprintf A
597597
#if M68K_LOG_1010_1111
@@ -893,8 +893,8 @@ typedef struct
893893
uint cyc_movem_l;
894894
uint cyc_shift;
895895
uint cyc_reset;
896-
uint8* cyc_instruction;
897-
uint8* cyc_exception;
896+
const uint8* cyc_instruction;
897+
const uint8* cyc_exception;
898898

899899
/* Callbacks to host */
900900
int (*int_ack_callback)(int int_line); /* Interrupt Acknowledge */
@@ -913,12 +913,12 @@ typedef struct
913913
extern m68ki_cpu_core m68ki_cpu;
914914
extern sint m68ki_remaining_cycles;
915915
extern uint m68ki_tracing;
916-
extern uint8 m68ki_shift_8_table[];
917-
extern uint16 m68ki_shift_16_table[];
918-
extern uint m68ki_shift_32_table[];
919-
extern uint8 m68ki_exception_cycle_table[][256];
916+
extern const uint8 m68ki_shift_8_table[];
917+
extern const uint16 m68ki_shift_16_table[];
918+
extern const uint m68ki_shift_32_table[];
919+
extern const uint8 m68ki_exception_cycle_table[][256];
920920
extern uint m68ki_address_space;
921-
extern uint8 m68ki_ea_idx_cycle_table[];
921+
extern const uint8 m68ki_ea_idx_cycle_table[];
922922

923923
extern uint m68ki_aerr_address;
924924
extern uint m68ki_aerr_write_mode;

src/emu/cpu/m68000/m68kdasm.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* ======================================================================== */
44
/*
55
* MUSASHI
6-
* Version 3.31
6+
* Version 3.32
77
*
88
* A portable Motorola M680x0 processor emulation engine.
99
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
@@ -12,7 +12,7 @@
1212
* copyright notice remains unaltered in the source code and any binary files
1313
* containing this code in compiled form.
1414
*
15-
* All other lisencing terms must be negotiated with the author
15+
* All other licensing terms must be negotiated with the author
1616
* (Karl Stenerud).
1717
*
1818
* The latest version of this code can be obtained at:
@@ -208,18 +208,18 @@ static const unsigned char* g_rawop;
208208
static uint g_rawbasepc;
209209

210210
/* used by ops like asr, ror, addq, etc */
211-
static uint g_3bit_qdata_table[8] = {8, 1, 2, 3, 4, 5, 6, 7};
211+
static const uint g_3bit_qdata_table[8] = {8, 1, 2, 3, 4, 5, 6, 7};
212212

213-
static uint g_5bit_data_table[32] =
213+
static const uint g_5bit_data_table[32] =
214214
{
215215
32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
216216
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
217217
};
218218

219-
static const char* g_cc[16] =
219+
static const char *const g_cc[16] =
220220
{"t", "f", "hi", "ls", "cc", "cs", "ne", "eq", "vc", "vs", "pl", "mi", "ge", "lt", "gt", "le"};
221221

222-
static const char* g_cpcc[64] =
222+
static const char *const g_cpcc[64] =
223223
{/* 000 001 010 011 100 101 110 111 */
224224
"f", "eq", "ogt", "oge", "olt", "ole", "ogl", "or", /* 000 */
225225
"un", "ueq", "ugt", "uge", "ult", "ule", "ne", "t", /* 001 */

0 commit comments

Comments
 (0)