removed unnecessary debug routines

This commit is contained in:
ArthurFerreira2 2020-08-14 18:36:27 +02:00 committed by GitHub
parent f01216aba2
commit 3a79269dc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 19 deletions

View File

@ -4,6 +4,12 @@
Last modified 1st of August 2020 Last modified 1st of August 2020
Copyright (c) 2018 Arthur Ferreira (arthur.ferreira2@gmail.com) Copyright (c) 2018 Arthur Ferreira (arthur.ferreira2@gmail.com)
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
https://github.com/ArthurFerreira2/puce6502
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
@ -543,6 +549,9 @@ void puce6502Exec(long long int cycleCount){
} }
} }
//=================================================== ADDED FOR REINETTE II PLUS
void puce6502Break() { void puce6502Break() {
BRK(); BRK();
} }
@ -550,20 +559,3 @@ void puce6502Break() {
void puce6502Goto(uint16_t address) { void puce6502Goto(uint16_t address) {
reg.PC = address; reg.PC = address;
} }
void puce6502DumpRegs() {
printf("\nPC:%04X A:%02X X:%02X Y:%02X SP:%02X SR:%02X", reg.PC ,reg.A, reg.X, reg.Y, reg.SP, reg.SR);
printf("\nCARRY:%d ZERO:%d INTR:%d DECIM:%d BREAK:%d OFLOW:%d SIGN:%d\n\n", reg.SR&CARRY, reg.SR&ZERO, reg.SR&INTR, reg.SR&DECIM, reg.SR&BREAK, reg.SR&OFLOW, reg.SR&SIGN);
}
void puce6502DumpPage(uint8_t page, uint8_t pageCount) {
if (page + pageCount >= RAMSIZE/0xFF) return;
printf("Page %02X\n", page);
for (int i=page*0xFF; i<(page+pageCount)*0xFF; i+=0x10) {
printf("%04X : ", i);
for (int j=i; j<i+0x10; j++) printf("%02X ", ram[j]);
printf(": ");
for (int j=i; j<i+0x10; j++) printf("%c", ram[j]>32 ? ram[j] : ' ');
printf("\n");
}
}

View File

@ -1,8 +1,15 @@
/* /*
Puce6502 - MOS 6502 cpu emulator Puce6502 - MOS 6502 cpu emulator
Last modified 1st of August 2020 Last modified 1st of August 2020
Copyright (c) 2018 Arthur Ferreira (arthur.ferreira2@gmail.com) Copyright (c) 2018 Arthur Ferreira (arthur.ferreira2@gmail.com)
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
https://github.com/ArthurFerreira2/puce6502
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
@ -20,6 +27,7 @@
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
#ifndef _CPU_H #ifndef _CPU_H
@ -42,7 +50,5 @@ void puce6502Exec(long long int cycleCount);
void puce6502Reset(); void puce6502Reset();
void puce6502Break(); void puce6502Break();
void puce6502Goto(uint16_t address); void puce6502Goto(uint16_t address);
void puce6502DumpRegs();
void puce6502DumpPage(uint8_t page, uint8_t pageCount);
#endif #endif