mirror of
https://github.com/holub/mame
synced 2025-05-22 05:38:52 +03:00
Fixed unaligned 16 and 32-bit i/o accesses in i386 CPU core [Barry Rodewald]
This commit is contained in:
parent
13dce3ebe6
commit
e1a32f54d8
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -149,7 +149,7 @@ src/emu/cpu/hd6309/hd6309.c svneol=native#text/plain
|
||||
src/emu/cpu/hd6309/hd6309.h svneol=native#text/plain
|
||||
src/emu/cpu/i386/cycles.h svneol=native#text/plain
|
||||
src/emu/cpu/i386/i386.c svneol=native#text/plain
|
||||
src/emu/cpu/i386/i386.h -text svneol=native#text/plain
|
||||
src/emu/cpu/i386/i386.h svneol=native#text/plain
|
||||
src/emu/cpu/i386/i386dasm.c svneol=native#text/plain
|
||||
src/emu/cpu/i386/i386op16.c svneol=native#text/plain
|
||||
src/emu/cpu/i386/i386op32.c svneol=native#text/plain
|
||||
|
@ -1,19 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __I386INTF_H__
|
||||
#define __I386INTF_H__
|
||||
|
||||
#define INPUT_LINE_A20 1
|
||||
|
||||
|
||||
// mingw has this defined for 32-bit compiles
|
||||
#undef i386
|
||||
|
||||
DECLARE_LEGACY_CPU_DEVICE(I386, i386);
|
||||
DECLARE_LEGACY_CPU_DEVICE(I486, i486);
|
||||
DECLARE_LEGACY_CPU_DEVICE(PENTIUM, pentium);
|
||||
DECLARE_LEGACY_CPU_DEVICE(MEDIAGX, mediagx);
|
||||
|
||||
|
||||
|
||||
#endif /* __I386INTF_H__ */
|
||||
#pragma once
|
||||
|
||||
#ifndef __I386INTF_H__
|
||||
#define __I386INTF_H__
|
||||
|
||||
#define INPUT_LINE_A20 1
|
||||
|
||||
|
||||
// mingw has this defined for 32-bit compiles
|
||||
#undef i386
|
||||
|
||||
DECLARE_LEGACY_CPU_DEVICE(I386, i386);
|
||||
DECLARE_LEGACY_CPU_DEVICE(I486, i486);
|
||||
DECLARE_LEGACY_CPU_DEVICE(PENTIUM, pentium);
|
||||
DECLARE_LEGACY_CPU_DEVICE(MEDIAGX, mediagx);
|
||||
|
||||
|
||||
|
||||
#endif /* __I386INTF_H__ */
|
||||
|
@ -894,10 +894,14 @@ INLINE void BUMP_DI(i386_state *cpustate,int adjustment)
|
||||
/***********************************************************************************/
|
||||
|
||||
#define READPORT8(port) (cpustate->io->read_byte(port))
|
||||
#define READPORT16(port) (cpustate->io->read_word(port))
|
||||
#define READPORT32(port) (cpustate->io->read_dword(port))
|
||||
#define READPORT16(port) (READPORT8(port) | (READPORT8(port+1) << 8))
|
||||
#define READPORT32(port) (READPORT8(port) | (READPORT8(port+1) << 8) | (READPORT8(port+2) << 16) | (READPORT8(port+3) << 24))
|
||||
#define WRITEPORT8(port, value) (cpustate->io->write_byte(port, value))
|
||||
#define WRITEPORT16(port, value) (cpustate->io->write_word(port, value))
|
||||
#define WRITEPORT32(port, value) (cpustate->io->write_dword(port, value))
|
||||
#define WRITEPORT16(port, value) WRITEPORT8(port,value & 0xff); \
|
||||
(WRITEPORT8(port+1,(value >> 8) & 0xff))
|
||||
#define WRITEPORT32(port, value) WRITEPORT8(port,value & 0xff); \
|
||||
(WRITEPORT8(port+1,(value >> 8) & 0xff)); \
|
||||
(WRITEPORT8(port+2,(value >> 16) & 0xff)); \
|
||||
(WRITEPORT8(port+3,(value >> 24) & 0xff))
|
||||
|
||||
#endif /* __I386_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user