mirror of
https://github.com/bradgrantham/apple2e.git
synced 2025-01-13 22:30:18 +00:00
on reset turn floppy off; MAINboard resets all boards; fix #47
This commit is contained in:
parent
13ece22f09
commit
65d8f90cf7
@ -1,20 +1,20 @@
|
|||||||
400 GR : REM SET COLOR GRAPHICS AREA
|
400 GR : REM SET COLOR GRAPHICS AREA
|
||||||
420 HOME : REM CLEAR TEXT AREA
|
420 HOME : REM CLEAR TEXT AREA
|
||||||
440 X = 0: REM SET STARTING POSITION OF BACK-AND-FORTH VARIABLE
|
440 X = 0: REM SET STARTING POSITION OF BACK-AND-FORTH VARIABLE
|
||||||
460 Y = 5: REM SET STARTING POSITION OF UP-AND-DOWN VARIABLE
|
460 Y = 5: REM SET STARTING POSITION OF UP-AND-DOWN VARIABLE
|
||||||
480 XV = 2: REM SET X VELOCITY
|
480 XV = 2: REM SET X VELOCITY
|
||||||
500 YV = 1: REM SET Y VELOCITY
|
500 YV = 1: REM SET Y VELOCITY
|
||||||
520 REM CALCULATE NEW POSITION
|
520 REM CALCULATE NEW POSITION
|
||||||
540 NX = X + XV:NY = Y + YV
|
540 NX = X + XV:NY = Y + YV
|
||||||
560 REM IF BALL EXCEEDS SCREEN EDGE, THEN BOUNCE
|
560 REM IF BALL EXCEEDS SCREEN EDGE, THEN BOUNCE
|
||||||
580 IF NX > 39 THEN NX = 39:XV = - XV
|
580 IF NX > 39 THEN NX = 39:XV = - XV
|
||||||
600 IF NX < 0 THEN NX = 0:XV = - XV
|
600 IF NX < 0 THEN NX = 0:XV = - XV
|
||||||
620 IF NY > 39 THEN NY = 39:YV = - YV
|
620 IF NY > 39 THEN NY = 39:YV = - YV
|
||||||
640 IF NY < 0 THEN NY = 0:YV = - YV
|
640 IF NY < 0 THEN NY = 0:YV = - YV
|
||||||
660 REM PLOT NEW POSITION
|
660 REM PLOT NEW POSITION
|
||||||
680 COLOR= 7: PLOT NX,NY
|
680 COLOR= 7: PLOT NX,NY
|
||||||
700 REM ERASE OLD POSITION
|
700 REM ERASE OLD POSITION
|
||||||
720 COLOR= 0: PLOT X,Y
|
720 COLOR= 0: PLOT X,Y
|
||||||
740 REM SAVE CURRENT POSITION
|
740 REM SAVE CURRENT POSITION
|
||||||
760 X = NX:Y = NY
|
760 X = NX:Y = NY
|
||||||
780 GOTO 540
|
780 GOTO 540
|
||||||
|
13
apple2e.cpp
13
apple2e.cpp
@ -660,7 +660,15 @@ struct DISKIIboard : board_base
|
|||||||
data = 0;
|
data = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual void reset(void) {}
|
virtual void reset(void)
|
||||||
|
{
|
||||||
|
driveMotorEnabled[0] = false; // Is this safe?
|
||||||
|
driveMotorEnabled[1] = false; // Is this safe?
|
||||||
|
driveSelected = 0;
|
||||||
|
trackBytesOutOfDate = true;
|
||||||
|
floppy_activity(0, false);
|
||||||
|
floppy_activity(1, false);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Mockingboard : board_base
|
struct Mockingboard : board_base
|
||||||
@ -1074,6 +1082,9 @@ struct MAINboard : board_base
|
|||||||
C08X_write_RAM = true;
|
C08X_write_RAM = true;
|
||||||
internal_C800_ROM_selected = true;
|
internal_C800_ROM_selected = true;
|
||||||
repage_regions("reset");
|
repage_regions("reset");
|
||||||
|
for(auto b : boards) {
|
||||||
|
b->reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool read(int addr, unsigned char &data)
|
bool read(int addr, unsigned char &data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user