Update to v104r10 release.
byuu says: Changelog: - processor/upd96050: per manual errata note, SGN always uses SA1; never SB1 [fixes v104r09 regression] - processor/upd96050: new OV1/S1 calculation that doesn't require OV0 history buffer [AWJ] - processor/upd96050: do not update DP in OP if DST=4 [Jonas Quinn] - processor/upd96050: do not update RP in OP if DST=5 [Jonas Quinn] - resource: recreated higan+icarus icons, higan logo as 32-bit PNGs So higan v104r08 and earlier were 930KiB for the source tarball. After creating new higan and icarus icons, the size jumped to 1090KiB, which was insane for only adding one additional icon. After digging into why, I discovered that ImageMagick defaults to 64-bit!! (16-bits per channel) PNG images when converting from SVG. You know, for all those 16-bit per channel monitors that don't exist. Sigh. Amazingly, nobody ever noticed this. The logo went from 78.8KiB to 24.5KiB, which in turn also means the generated resource.cpp shrank dramatically. The old higan icon was 32-bit PNG, because it was created before I installed FreeBSD and switched to ImageMagick. But the new higan icon, plus the new icarus icon, were both 64-bit as well. And they're now 32-bit. So the new tarball size, thanks to the logo optimization, dropped to 830KiB. Cydrak had some really interesting results in converting higan's resources to 8-bit palletized PNGs with the tRNS extension for alpha transparency. It reduces the file sizes even more without much visual fidelity loss. Eg the higan logo uses 778 colors currently, and 256 represents nearly all of it very well to the human eye. It's based off of only two colors, the rest are all anti-aliasing. Unfortunately, nall/image doesn't support this yet, and I didn't want to flatten the higan logo to not have transparency, in case I ever want to change the about screen background color.
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 13 KiB |
|
@ -12,7 +12,7 @@ using namespace nall;
|
||||||
|
|
||||||
namespace Emulator {
|
namespace Emulator {
|
||||||
static const string Name = "higan";
|
static const string Name = "higan";
|
||||||
static const string Version = "104.09";
|
static const string Version = "104.10";
|
||||||
static const string Author = "byuu";
|
static const string Author = "byuu";
|
||||||
static const string License = "GPLv3";
|
static const string License = "GPLv3";
|
||||||
static const string Website = "http://byuu.org/";
|
static const string Website = "http://byuu.org/";
|
||||||
|
|
|
@ -31,7 +31,7 @@ auto uPD96050::execOP(uint24 opcode) -> void {
|
||||||
case 4: idb = regs.dp; break;
|
case 4: idb = regs.dp; break;
|
||||||
case 5: idb = regs.rp; break;
|
case 5: idb = regs.rp; break;
|
||||||
case 6: idb = dataROM[regs.rp]; break;
|
case 6: idb = dataROM[regs.rp]; break;
|
||||||
case 7: idb = 0x8000 - (!asl ? flags.a.s1 : flags.b.s1); break;
|
case 7: idb = 0x8000 - flags.a.s1; break; //ASL ignored; always SA1
|
||||||
case 8: idb = regs.dr; regs.sr.rqm = 1; break;
|
case 8: idb = regs.dr; regs.sr.rqm = 1; break;
|
||||||
case 9: idb = regs.dr; break;
|
case 9: idb = regs.dr; break;
|
||||||
case 10: idb = regs.sr; break;
|
case 10: idb = regs.sr; break;
|
||||||
|
@ -77,8 +77,8 @@ auto uPD96050::execOP(uint24 opcode) -> void {
|
||||||
case 15: r = q << 8 | q >> 8; break; //XCHG
|
case 15: r = q << 8 | q >> 8; break; //XCHG
|
||||||
}
|
}
|
||||||
|
|
||||||
flag.s0 = r & 0x8000;
|
|
||||||
flag.z = r == 0;
|
flag.z = r == 0;
|
||||||
|
flag.s0 = r & 0x8000;
|
||||||
|
|
||||||
switch(alu) {
|
switch(alu) {
|
||||||
|
|
||||||
|
@ -89,9 +89,9 @@ auto uPD96050::execOP(uint24 opcode) -> void {
|
||||||
case 13: //SHL2
|
case 13: //SHL2
|
||||||
case 14: //SHL4
|
case 14: //SHL4
|
||||||
case 15: { //XCHG
|
case 15: { //XCHG
|
||||||
flag.c = 0;
|
|
||||||
flag.ov0 = 0;
|
flag.ov0 = 0;
|
||||||
flag.ov1 = 0;
|
flag.ov1 = 0;
|
||||||
|
flag.c = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,33 +110,22 @@ auto uPD96050::execOP(uint24 opcode) -> void {
|
||||||
flag.ov0 = (q ^ r) & (q ^ p) & 0x8000;
|
flag.ov0 = (q ^ r) & (q ^ p) & 0x8000;
|
||||||
flag.c = r > q;
|
flag.c = r > q;
|
||||||
}
|
}
|
||||||
|
if(!flag.ov1) flag.s1 = flag.s0;
|
||||||
//ovh[] = last three overflow flags (0 = most recent result)
|
flag.ov1 = flag.ov0 & flag.ov1 ? flag.s0 == flag.s1 : flag.ov0 | flag.ov1;
|
||||||
flag.ovh[2] = flag.ovh[1];
|
|
||||||
flag.ovh[1] = flag.ovh[0];
|
|
||||||
flag.ovh[0] = flag.ov0;
|
|
||||||
|
|
||||||
boolean s1 = !flag.ov1 ? flag.s0 : flag.s1;
|
|
||||||
flag.ov1 = (
|
|
||||||
(flag.ovh[0] ^ flag.ovh[1] ^ flag.ovh[2])
|
|
||||||
| (flag.ovh[0] & !flag.ovh[1] & flag.ovh[2] & flag.s0 == flag.s1)
|
|
||||||
);
|
|
||||||
flag.s1 = s1;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 11: { //SHR1 (ASR)
|
case 11: { //SHR1 (ASR)
|
||||||
flag.c = q & 1;
|
|
||||||
flag.ov0 = 0;
|
flag.ov0 = 0;
|
||||||
flag.ov1 = 0;
|
flag.ov1 = 0;
|
||||||
|
flag.c = q & 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 12: { //SHL1 (ROL)
|
case 12: { //SHL1 (ROL)
|
||||||
flag.c = q >> 15;
|
|
||||||
flag.ov0 = 0;
|
flag.ov0 = 0;
|
||||||
flag.ov1 = 0;
|
flag.ov1 = 0;
|
||||||
|
flag.c = q >> 15;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,17 +137,20 @@ auto uPD96050::execOP(uint24 opcode) -> void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
execLD((idb << 6) + dst);
|
execLD(idb << 6 | dst);
|
||||||
|
|
||||||
switch(dpl) {
|
if(dst != 4) { //if LD does not write to DP
|
||||||
case 1: regs.dp = (regs.dp & 0xf0) + (regs.dp + 1 & 0x0f); break; //DPINC
|
switch(dpl) {
|
||||||
case 2: regs.dp = (regs.dp & 0xf0) + (regs.dp - 1 & 0x0f); break; //DPDEC
|
case 1: regs.dp = (regs.dp & 0xf0) + (regs.dp + 1 & 0x0f); break; //DPINC
|
||||||
case 3: regs.dp = (regs.dp & 0xf0); break; //DPCLR
|
case 2: regs.dp = (regs.dp & 0xf0) + (regs.dp - 1 & 0x0f); break; //DPDEC
|
||||||
|
case 3: regs.dp = (regs.dp & 0xf0); break; //DPCLR
|
||||||
|
}
|
||||||
|
regs.dp ^= dphm << 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
regs.dp ^= dphm << 4;
|
if(dst != 5) { //if LD does not write to RP
|
||||||
|
if(rpdcr) regs.rp--;
|
||||||
if(rpdcr) regs.rp--;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto uPD96050::execRT(uint24 opcode) -> void {
|
auto uPD96050::execRT(uint24 opcode) -> void {
|
||||||
|
|
|
@ -12,7 +12,6 @@ auto uPD96050::Flag::serialize(serializer& s) -> void {
|
||||||
s.boolean(c);
|
s.boolean(c);
|
||||||
s.boolean(s0);
|
s.boolean(s0);
|
||||||
s.boolean(s1);
|
s.boolean(s1);
|
||||||
s.array(ovh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto uPD96050::Status::serialize(serializer& s) -> void {
|
auto uPD96050::Status::serialize(serializer& s) -> void {
|
||||||
|
|
|
@ -54,9 +54,6 @@ struct uPD96050 {
|
||||||
boolean c; //carry
|
boolean c; //carry
|
||||||
boolean s0; //sign 0
|
boolean s0; //sign 0
|
||||||
boolean s1; //sign 1
|
boolean s1; //sign 1
|
||||||
|
|
||||||
//internal
|
|
||||||
boolean ovh[3]; //overflow 0 history
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Status {
|
struct Status {
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
all:
|
all:
|
||||||
sourcery resource.bml resource.cpp resource.hpp
|
sourcery resource.bml resource.cpp resource.hpp
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm resource.cpp
|
||||||
|
rm resource.hpp
|
||||||
|
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 14 KiB |