free-pdk / fppa-pdk-tools Goto Github PK
View Code? Open in Web Editor NEWPDK FPPA disassembler, simulator, ...
License: MIT License
PDK FPPA disassembler, simulator, ...
License: MIT License
For pdk14, there also is another emulator:
ucsim has support for pdk14 (emulates the PMCS132B, though so far just the core, no peripherals yet).
Since the SDCC regression tests and ucsim interact well (ucsim is also used for regression testing of some other SDCC backends), that one is used in the automated regression testing of pdk14.
ucsim does not yet support the pdk13 or pdk15 (see https://sourceforge.net/p/sdcc/feature-requests/619/).
I wonder if it makes sense to keep developing two different simulators.
Philipp
Please note that the current repository fails to build. I tried both MSYS (windows) and a recent distribution of Mint.
The root cause is somewhat cryptic to me right now. See below.
opcode/opcode14.c: In function 'opcode14':
include/emucpu.h:108:10: error: inlining failed in call to always_inline 'emuCPUcodeGet': function body not available
opcode/opcode14.c:10:21: note: called from here
uint16_t opcode = emuCPUcodeGet( cpu, ePC++ ) & 0x3FFF; //fetch next opcode and advance PC
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from opcode/opcode14.c:4:0:
include/emucpu.h:108:10: error: inlining failed in call to always_inline 'emuCPUcodeGet': function body not available
uint16_t emuCPUcodeGet(struct emuCPU *cpu, uint16_t addr) attribute((always_inline));
^~~~~~~~~~~~~
opcode/opcode14.c:20:23: note: called from here
case 0x0006: eA=emuCPUcodeGet(cpu,emuCPUmemGet(cpu,eSP)|(((uint16_t)emuCPUmemGet(cpu,eSP+1))<<8))&0xFF; eCycle++; break; //LDSPTL //TODO: verify, Z?
I get failures trying to decode PDK files generated with the 0.97 IDE. Could be something on my end, or they might have changed the encryption again.
DZSN M supposed to skip if zero flag set, current implementation skips if zero flag not set.
wrong:
case 0x1180: eF=emuCPUsubSolveFlagsVACZ(M,1,0);emuCPUmemPut(cpu,addr,M-1);if(!(eF&1)){ePC++;eCycle++;}break; //DZSN M
correct:
case 0x1180: eF=emuCPUsubSolveFlagsVACZ(M,1,0);emuCPUmemPut(cpu,addr,M-1);if((eF&1)){ePC++;eCycle++;}break; //DZSN M
I tracked down that you move the fixupHighCode logic from emupdk.c to each specific cpu init function but the problem is that you "fix" the code before loading the pdk file.
In emuCPUloadPDK(...)
(emucpu.c), you first init the cpu (which patch the HighCode) but after you load the code from the PDK file which revert the modification and prevents the emulator to work.
It would be awesome to have support of Padauk processors in Ghidra, so one could easily disassemble and decompile them
--- ./fppa-pdk-tools/cpuvariant/pmx150.c 2021-02-07 17:51:08.464264736 +0800
+++ pmx150.c 2021-02-07 18:19:26.728133987 +0800
@@ -87,6 +87,7 @@
case 0x10: if(bit<8) sprintf(buffer,"PA.%d",bit); else r="PA"; break;
case 0x11: if(bit<8) sprintf(buffer,"PAC.%d",bit); else r="PAC"; break;
case 0x12: if(bit<8) sprintf(buffer,"PAPH.%d",bit); else r="PAPH"; break;
case 0x13: if(bit<8) sprintf(buffer,"PAPL.%d",bit); else r="PAPH"; break;
case 0x17: r="TM2S"; break;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.