Compare commits

...

14 Commits
0.4 ... master

Author SHA1 Message Date
ArthurFerreira2
b272efd8e3
Update puce6502.h 2023-09-10 12:50:02 +02:00
ArthurFerreira2
fe9b6f28b6
Update reinetteII+.c 2023-09-10 12:49:48 +02:00
ArthurFerreira2
e213ebacdd
Update puce6502.c 2023-09-10 12:49:26 +02:00
ArthurFerreira2
3342915985
Update README.md 2021-06-25 00:27:41 +02:00
ArthurFerreira2
8a6f8af6e8
stable version 2021-06-24 22:55:47 +02:00
ArthurFerreira2
5596f245fb
Delete Lode Runner.nib 2021-05-26 22:07:56 +02:00
ArthurFerreira2
90011f394e
Delete Ms. Pacman.nib 2021-05-26 22:07:46 +02:00
ArthurFerreira2
43402cff22
Delete DOS3.3 Blank.nib 2020-09-07 14:55:15 +02:00
ArthurFerreira2
d574c661fa
Delete reinetteII+.res 2020-09-07 14:53:26 +02:00
ArthurFerreira2
891e9c35cc
Delete reinetteII+.exe 2020-09-07 14:53:05 +02:00
ArthurFerreira2
b6002de8db v0.4c 2020-09-07 14:40:32 +02:00
ArthurFerreira2
ad586e79f5
Update puce6502.h 2020-09-06 23:34:52 +02:00
ArthurFerreira2
28fa0f62bc
Update reinetteII+.c 2020-09-06 23:34:02 +02:00
ArthurFerreira2
d309a5e5e7
Update README.md 2020-09-06 00:50:53 +02:00
45 changed files with 2814 additions and 1273 deletions

1
DOS 3.3.nib generated Normal file

File diff suppressed because one or more lines are too long

1
DOS3.3 Blank.nib generated

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,9 @@
CC = gcc
FLAGS = -std=c99 -pedantic -Wpedantic -Wall -O3
FLAGS = -std=c11 -pedantic -Wpedantic -Wall -O3
LIBS = -lSDL2
# comment this line if you are under Linux :
# comment these two lines if you are under Linux :
WIN32-LIBS = -lmingw32 -lSDL2main -Wl,-subsystem,windows
# comment this line if you are under Linux :
WIN32-RES = reinetteII+.res
reinetteII+: reinetteII+.c puce6502.c $(WIN32-RES)

View File

@ -8,7 +8,7 @@ After [reinette](https://github.com/ArthurFerreira2/reinette) (Apple 1 emulator)
\* reinette has two meanings in French : it's a little frog but also a delicious kind of apple
[download windows binaries](https://github.com/ArthurFerreira2/reinette-II-plus/releases/tag/0.4b)
[download windows binaries](https://github.com/ArthurFerreira2/reinette-II-plus/releases/tag/0.4)
### Featuring :
@ -24,7 +24,7 @@ After [reinette](https://github.com/ArthurFerreira2/reinette) (Apple 1 emulator)
* easy screenshot
It uses the same MOS 6502 CPU emulator as her sisters (now christened [puce6502](https://github.com/ArthurFerreira2/puce6502)).\
It uses an optimized and accurate MOS 6502 CPU emulator (now christened [puce6502](https://github.com/ArthurFerreira2/puce6502)).\
You only need SDL2 to compile it. (I'm not using SDL_Mixer, but only the native SDL2 audio functions)
This emulator is not accurate in many ways and does not compete with
@ -32,13 +32,13 @@ This emulator is not accurate in many ways and does not compete with
I wrote it with the goal to better understand the Apple ][ internals, and I'm publishing the sources in the hope they will be of any help.
It's compact, less than 1000 SLOC, with two source files only, one for the CPU emulation, the other for the computer itself.
It's compact, with two source files only, one for the CPU emulation, the other for the computer itself.
I did my best to comment the code, and if you have an idea of how an Apple ][ works, it should be easy for you to understand the code, modify and enhance it for your needs (see TODO section).
### Startup
You can specify a .nib file on the command line to start the emulator with a floppy engaged in drive 1. Otherwise, the emulator will start with no floppy (and thus waits until you press the reset key or drag and drop a .nib file)
You can specify a .nib file at the command line to start the emulator with a floppy engaged in drive 1. Otherwise, the emulator will start with no floppy (and thus waits until you press the reset key or drag and drop a .nib file)
### Usage
@ -66,9 +66,7 @@ Use the functions keys to control the emulator itself :
* F7 : reset the zoom to 2:1
* shift F7 : increase zoom up to 8:1 max
* ctrl F7 : decrease zoom down to 1:1 pixels
* F8 : monochrome / color display (only in HGR mode)
* F9 : pause / un-pause the emulator
* F10 : break
* F10 : pause / un-pause the emulator
* F11 : reset
* F12 : about, help

2444
puce6502.c

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,9 @@
/*
Puce6502 - MOS 6502 cpu emulator
Last modified 1st of August 2020
Copyright (c) 2018 Arthur Ferreira (arthur.ferreira2@gmail.com)
Copyright (c) 2018 Arthur Ferreira
This version has been modified for reinette II plus, a french Apple II plus
This version has been modified for Reinette II plus, a french Apple II plus
emulator using SDL2 (https://github.com/ArthurFerreira2/reinette-II-plus).
Please download the latest version from
@ -27,36 +26,26 @@
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifndef _PUCE6502_H
#define _PUCE6502_H
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef enum {false, true} bool;
typedef enum { false, true } bool;
#define RAMSIZE 0xC000
#define ROMSTART 0xD000
#define ROMSIZE 0x3000
#define LGCSTART 0xD000
#define LGCSIZE 0x3000
#define BK2START 0xD000
#define BK2SIZE 0x1000
#define SL6START 0xC600
#define SL6SIZE 0x00FF
extern unsigned long long int ticks;
uint8_t ram[RAMSIZE]; // 48K of ram in $000-$BFFF
uint8_t rom[ROMSIZE]; // 12K of rom in $D000-$FFFF
uint8_t lgc[LGCSIZE]; // Language Card 12K in $D000-$FFFF
uint8_t bk2[BK2SIZE]; // bank 2 of Language Card 4K in $D000-$DFFF
uint8_t sl6[SL6SIZE]; // P5A disk ][ PROM in slot 6
uint16_t puce6502Exec(unsigned long long int cycleCount);
void puce6502RST();
void puce6502IRQ();
void puce6502NMI();
long long int ticks;
void puce6502Exec(long long int cycleCount);
void puce6502Reset();
void puce6502Break();
// void printRegs();
// void dasm(uint16_t address);
// void setPC(uint16_t address);
// uint16_t getPC();
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
1 ICON "assets/reinetteII+.ico"
1 VERSIONINFO
FILEVERSION 0,4,1,0
PRODUCTVERSION 0,4,0,0
FILEVERSION 0,4,8,0
PRODUCTVERSION 0,4,8,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
@ -9,12 +9,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Arthur Ferreira"
VALUE "FileDescription", "Apple II+ emulator"
VALUE "FileVersion", "0.4.1.0"
VALUE "FileVersion", "0.4.8.0"
VALUE "InternalName", "reinette II plus"
VALUE "LegalCopyright", "Arthur Ferreira"
VALUE "OriginalFilename", "reinetteII+.exe"
VALUE "ProductName", "reinette II plus"
VALUE "ProductVersion", "0.4"
VALUE "ProductVersion", "0.4.8.0"
END
END
BLOCK "VarFileInfo"

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

BIN
screenshots/Lode Runner.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB

BIN
screenshots/Ms. Pac-Man.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB

BIN
screenshots/Ms. Pacman.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB

BIN
screenshots/no disk.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB