little corrections

This commit is contained in:
ArthurFerreira2 2020-08-08 23:55:26 +02:00 committed by GitHub
parent 10db03ee3f
commit 766eb737e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 23 deletions

View File

@ -4,7 +4,7 @@
![screenshots](screenshots.png)
After [reinette](https://github.com/ArthurFerreira2/reinette) (Apple 1 emulator) and [reinette II](https://github.com/ArthurFerreira2/reinette-II) (the text only Apple II emulator), I am proud to release reinette II plus, a french\* Apple II plus emulator using SDL2.
After [reinette](https://github.com/ArthurFerreira2/reinette) (Apple 1 emulator) and [reinette II](https://github.com/ArthurFerreira2/reinette-II) (the text only Apple II emulator), I am proud to release **reinette II plus**, a french\* Apple II plus emulator using SDL2.
\* reinette has two meanings in french : it's a little frog but also a delicious kind of apple
@ -26,13 +26,13 @@ You only need SDL2 to compile it. (I'm not using SDL_Mixer, but only the native
This emulator is not accurate in many ways and does not compete with
[AppleWin](https://github.com/AppleWin/AppleWin), [Epple](https://github.com/cmosher01/Epple-II) or [LinApple](https://github.com/linappleii/linapple). Better use one of them if you want a better Apple ][ experience.
[AppleWin](https://github.com/AppleWin/AppleWin), [Epple](https://github.com/cmosher01/Epple-II) or [LinApple](https://github.com/linappleii/linapple). Better use one of them if you want a good Apple ][ emulation experience.
I wrote it in the goal to better understand the Apple ][ internals, and I'm publishing the sources in the hope they will be of any help.
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 800 SLOC, with two source files only, one for the CPU emulation, the other for the computer itself.
It's compact, less than 1000 SLOC, with two source files only, one for the CPU emulation, the other for the computer itself.
I did my best to comment everything, 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).
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
@ -48,6 +48,7 @@ Drop the file while pressing the ALT key to insert it into drive 2
Use the functions keys to control the emulator itself
```
* F1 : writes the changes of the floppy in current drive back to host
* F4 : paste text from clipboard
* F5 : zoom out down to 1:1
* F6 : zoom in, no magnification limit
* F7/F8 : adjust joystic trim
@ -66,13 +67,13 @@ Paddles / Joystic :
* ALT : button 1
```
### limitations
### Limitations
* high pitch noise at high volume (might be related with my environment)
* sound cracks when playing for long period (intro music for example)
* CPU is not 100% cycle accurate - see source file for more details
* colors are approximate (taken from a scan of an old Beagle bros. poster)
* HGR is inhacurate, and does not implement color clashing
* HGR video is inaccurate, and does not implement color clashing
* disk ][ access is artificially accelerated
* only support .nib floppy images. (you can use [CiderPress](https://github.com/fadden/ciderpress) to convert your images to this format)
* only has 48KB of RAM (can't run some software requiring the language card)
@ -81,14 +82,20 @@ Paddles / Joystic :
### To do :
* warn if you quit the application with unsaved floppy changes
* give the user the option to switch to the original Apple II rom
* give a warning if the application exits with unsaved floppy changes
* give the user the option to start with the original Apple II rom
* colors where taken from an old Beagle Bros poster, find more accurate RGB values.
* implement color clashing in HGR
* optimize sound generation
* optimize disk access (actually a bit artificial)
* optimize disk access (speed is actually a bit artificial)
* re-implement Paddles and Joystic support for a better analog simulation
* implement a language card to extend the RAM of reinette II plus to 64K and support more sofware.
* implement the language card and extend the RAM of **reinette II plus** to 64K to support more sofware.
* for 6502 coders :
* add the ability to insert a binary file at a specified address
* dump regs, soft swithes and specified memory pages to console
Follow me to keep updated !
\
\
\
*simplicity is the ultimate sophistication*

View File

@ -353,8 +353,16 @@ int main(int argc, char *argv[]){
switch (event.key.keysym.sym){
// EMULATOR CONTROL :
case SDLK_INSERT: // Shift+Insert => paste txt
if (shift && SDL_HasClipboardText()){
case SDLK_F1: // save curDrv back to host
if (disk[curDrv].filename[0] && !disk[curDrv].readOnly)
if((f = fopen(disk[curDrv].filename, "wb"))){
fwrite(disk[curDrv].data, 1, 232960, f);
fclose(f);
}
break;
case SDLK_F4: // paste txt from clipboard
if (SDL_HasClipboardText()){
char *clipboardText = SDL_GetClipboardText();
int c = 0;
while (clipboardText[c]){ // all chars until ascii NUL
@ -366,14 +374,6 @@ int main(int argc, char *argv[]){
}
break;
case SDLK_F1: // save curDrv back to host
if (disk[curDrv].filename[0] && !disk[curDrv].readOnly)
if((f = fopen(disk[curDrv].filename, "wb"))){
fwrite(disk[curDrv].data, 1, 232960, f);
fclose(f);
}
break;
case SDLK_F5: if ((zoom-=2) < 0) zoom = 0; // zoom out
case SDLK_F6: if (++zoom > 8) zoom = 8; // zoom in
SDL_SetWindowSize(wdo, 280*zoom, 192*zoom);