Skip to content

Commit

Permalink
MAME 0.122
Browse files Browse the repository at this point in the history
  • Loading branch information
mamedev committed Dec 18, 2007
1 parent 88b1c53 commit 6f03755
Show file tree
Hide file tree
Showing 81 changed files with 1,721 additions and 1,135 deletions.
38 changes: 19 additions & 19 deletions docs/newvideo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ how you should configure MAME with the new rendering system in place.

The New Video Landscape

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

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

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

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


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


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

-video ddraw -nohwstretch -switchres [-triplebuffer]

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


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

Finally, you may be wondering about effects (and yes, scanlines are
an effect). Effects are no longer hard-coded into the system.
an "effect"). Effects are no longer hard-coded into the system.
Rather, you can provide a PNG file in the artwork directory that will
be loaded and overlaid on top of screen bitmaps. See the description
of -effect in windows.txt for more details.
4 changes: 2 additions & 2 deletions src/emu/cpu/m68000/m68k.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* ======================================================================== */
/*
* MUSASHI
* Version 3.31
* Version 3.32
*
* A portable Motorola M680x0 processor emulation engine.
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
Expand All @@ -15,7 +15,7 @@
* copyright notice remains unaltered in the source code and any binary files
* containing this code in compiled form.
*
* All other lisencing terms must be negotiated with the author
* All other licensing terms must be negotiated with the author
* (Karl Stenerud).
*
* The latest version of this code can be obtained at:
Expand Down
8 changes: 4 additions & 4 deletions src/emu/cpu/m68000/m68k_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ must fix:
/* ======================================================================== */
/*
* MUSASHI
* Version 3.31
* Version 3.32
*
* A portable Motorola M680x0 processor emulation engine.
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
Expand All @@ -17,7 +17,7 @@ must fix:
* copyright notice remains unaltered in the source code and any binary files
* containing this code in compiled form.
*
* All other lisencing terms must be negotiated with the author
* All other licensing terms must be negotiated with the author
* (Karl Stenerud).
*
* The latest version of this code can be obtained at:
Expand Down Expand Up @@ -141,7 +141,7 @@ typedef struct


/* Opcode handler table */
static opcode_handler_struct m68k_opcode_handler_table[] =
static const opcode_handler_struct m68k_opcode_handler_table[] =
{
/* function mask match 000 010 020 040 */

Expand All @@ -157,7 +157,7 @@ M68KMAKE_TABLE_FOOTER
/* Build the opcode handler jump table */
void m68ki_build_opcode_table(void)
{
opcode_handler_struct *ostruct;
const opcode_handler_struct *ostruct;
int instr;
int i;
int j;
Expand Down
4 changes: 2 additions & 2 deletions src/emu/cpu/m68000/m68kconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* ======================================================================== */
/*
* MUSASHI
* Version 3.31
* Version 3.32
*
* A portable Motorola M680x0 processor emulation engine.
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
Expand All @@ -12,7 +12,7 @@
* copyright notice remains unaltered in the source code and any binary files
* containing this code in compiled form.
*
* All other lisencing terms must be negotiated with the author
* All other licensing terms must be negotiated with the author
* (Karl Stenerud).
*
* The latest version of this code can be obtained at:
Expand Down
18 changes: 9 additions & 9 deletions src/emu/cpu/m68000/m68kcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
/* ======================================================================== */

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

#ifdef M68K_LOG_ENABLE
const char* m68ki_cpu_names[] =
const char *const m68ki_cpu_names[] =
{
"Invalid CPU",
"M68000",
Expand Down Expand Up @@ -83,7 +83,7 @@ uint m68ki_aerr_write_mode;
uint m68ki_aerr_fc;

/* Used by shift & rotate instructions */
uint8 m68ki_shift_8_table[65] =
const uint8 m68ki_shift_8_table[65] =
{
0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
Expand All @@ -92,7 +92,7 @@ uint8 m68ki_shift_8_table[65] =
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff
};
uint16 m68ki_shift_16_table[65] =
const uint16 m68ki_shift_16_table[65] =
{
0x0000, 0x8000, 0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00,
0xff80, 0xffc0, 0xffe0, 0xfff0, 0xfff8, 0xfffc, 0xfffe, 0xffff, 0xffff,
Expand All @@ -103,7 +103,7 @@ uint16 m68ki_shift_16_table[65] =
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff
};
uint m68ki_shift_32_table[65] =
const uint m68ki_shift_32_table[65] =
{
0x00000000, 0x80000000, 0xc0000000, 0xe0000000, 0xf0000000, 0xf8000000,
0xfc000000, 0xfe000000, 0xff000000, 0xff800000, 0xffc00000, 0xffe00000,
Expand All @@ -122,7 +122,7 @@ uint m68ki_shift_32_table[65] =
/* Number of clock cycles to use for exception processing.
* I used 4 for any vectors that are undocumented for processing times.
*/
uint8 m68ki_exception_cycle_table[4][256] =
const uint8 m68ki_exception_cycle_table[4][256] =
{
{ /* 000 */
4, /* 0: Reset - Initial Stack Pointer */
Expand Down Expand Up @@ -418,7 +418,7 @@ uint8 m68ki_exception_cycle_table[4][256] =
}
};

uint8 m68ki_ea_idx_cycle_table[64] =
const uint8 m68ki_ea_idx_cycle_table[64] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, /* ..01.000 no memory indirect, base NULL */
Expand Down
20 changes: 10 additions & 10 deletions src/emu/cpu/m68000/m68kcpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* ======================================================================== */
/*
* MUSASHI
* Version 3.31
* Version 3.32
*
* A portable Motorola M680x0 processor emulation engine.
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
Expand All @@ -13,7 +13,7 @@
* copyright notice remains unaltered in the source code and any binary files
* containing this code in compiled form.
*
* All other lisencing terms must be negotiated with the author
* All other licensing terms must be negotiated with the author
* (Karl Stenerud).
*
* The latest version of this code can be obtained at:
Expand Down Expand Up @@ -591,7 +591,7 @@
#if M68K_LOG_ENABLE
#include <stdio.h>
extern FILE* M68K_LOG_FILEHANDLE
extern char* m68ki_cpu_names[];
extern const char *const m68ki_cpu_names[];

#define M68K_DO_LOG(A) if(M68K_LOG_FILEHANDLE) fprintf A
#if M68K_LOG_1010_1111
Expand Down Expand Up @@ -893,8 +893,8 @@ typedef struct
uint cyc_movem_l;
uint cyc_shift;
uint cyc_reset;
uint8* cyc_instruction;
uint8* cyc_exception;
const uint8* cyc_instruction;
const uint8* cyc_exception;

/* Callbacks to host */
int (*int_ack_callback)(int int_line); /* Interrupt Acknowledge */
Expand All @@ -913,12 +913,12 @@ typedef struct
extern m68ki_cpu_core m68ki_cpu;
extern sint m68ki_remaining_cycles;
extern uint m68ki_tracing;
extern uint8 m68ki_shift_8_table[];
extern uint16 m68ki_shift_16_table[];
extern uint m68ki_shift_32_table[];
extern uint8 m68ki_exception_cycle_table[][256];
extern const uint8 m68ki_shift_8_table[];
extern const uint16 m68ki_shift_16_table[];
extern const uint m68ki_shift_32_table[];
extern const uint8 m68ki_exception_cycle_table[][256];
extern uint m68ki_address_space;
extern uint8 m68ki_ea_idx_cycle_table[];
extern const uint8 m68ki_ea_idx_cycle_table[];

extern uint m68ki_aerr_address;
extern uint m68ki_aerr_write_mode;
Expand Down
12 changes: 6 additions & 6 deletions src/emu/cpu/m68000/m68kdasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* ======================================================================== */
/*
* MUSASHI
* Version 3.31
* Version 3.32
*
* A portable Motorola M680x0 processor emulation engine.
* Copyright 1998-2007 Karl Stenerud. All rights reserved.
Expand All @@ -12,7 +12,7 @@
* copyright notice remains unaltered in the source code and any binary files
* containing this code in compiled form.
*
* All other lisencing terms must be negotiated with the author
* All other licensing terms must be negotiated with the author
* (Karl Stenerud).
*
* The latest version of this code can be obtained at:
Expand Down Expand Up @@ -208,18 +208,18 @@ static const unsigned char* g_rawop;
static uint g_rawbasepc;

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

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

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

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

0 comments on commit 6f03755

Please sign in to comment.