| 1 | /* Code from Exomizer distributed under the zlib License |
| 2 | * by kind permission of the original authors |
| 3 | * Magnus Lind and iAN CooG. |
| 4 | */ |
| 5 | |
| 6 | /* |
| 7 | * Copyright (c) 2002 - 2023 Magnus Lind. |
| 8 | * |
| 9 | * |
| 10 | * This software is provided 'as-is', without any express or implied |
| 11 | * warranty. In no event will the authors be held liable for any damages |
| 12 | * arising from the use of this software. |
| 13 | * |
| 14 | * Permission is granted to anyone to use this software for any purpose, |
| 15 | * including commercial applications, and to alter it and redistribute it |
| 16 | * freely, subject to the following restrictions: |
| 17 | * |
| 18 | * 1. The origin of this software must not be misrepresented; you must not |
| 19 | * claim that you wrote the original software. If you use this software |
| 20 | * in a product, an acknowledgment in the product documentation would be |
| 21 | * appreciated but is not required. |
| 22 | * 2. Altered source versions must be plainly marked as such, and must not be |
| 23 | * misrepresented as being the original software. |
| 24 | * 3. This notice may not be removed or altered from any source distribution. |
| 25 | * |
| 26 | */ |
| 27 | |
| 28 | /* |
| 29 | Original: Magnus Lind |
| 30 | Modifications for UNP64: iAN CooG and Petter Sjölund |
| 31 | C++ version based on code adapted to ScummVM by Avijeet Maurya |
| 32 | */ |
| 33 | |
| 34 | |
| 35 | #ifndef UNP64_6502_EMU_H |
| 36 | #define UNP64_6502_EMU_H |
| 37 | |
| 38 | namespace Unp64 { |
| 39 | |
| 40 | struct CpuCtx { |
| 41 | uint32_t _cycles; |
| 42 | uint16_t _pc; |
| 43 | uint8_t *_mem; |
| 44 | uint8_t _sp; |
| 45 | uint8_t _flags; |
| 46 | uint8_t _a; |
| 47 | uint8_t _x; |
| 48 | uint8_t _y; |
| 49 | }; |
| 50 | |
| 51 | int nextInst(CpuCtx *r); |
| 52 | |
| 53 | } // End of namespace Unp64 |
| 54 | |
| 55 | #endif |