From b2a19b6a68bd17ef95fa2426379e982d85629167 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sat, 7 Feb 2015 11:27:43 +0100 Subject: [PATCH] Kale, does that break c65? (nw) --- src/emu/cpu/m6502/m6502.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emu/cpu/m6502/m6502.h b/src/emu/cpu/m6502/m6502.h index 9ca5e08fdda..f77a33f6ae8 100644 --- a/src/emu/cpu/m6502/m6502.h +++ b/src/emu/cpu/m6502/m6502.h @@ -220,8 +220,8 @@ protected: // inline helpers static inline bool page_changing(UINT16 base, int delta) { return ((base + delta) ^ base) & 0xff00; } - static inline UINT16 set_l(UINT16 base, UINT16 val) { return (base & 0xff00) | val; } - static inline UINT16 set_h(UINT16 base, UINT16 val) { return (base & 0x00ff) | (val << 8); } + static inline UINT16 set_l(UINT16 base, UINT8 val) { return (base & 0xff00) | val; } + static inline UINT16 set_h(UINT16 base, UINT8 val) { return (base & 0x00ff) | (val << 8); } inline void dec_SP() { SP = set_l(SP, SP-1); } inline void inc_SP() { SP = set_l(SP, SP+1); }