hoglet67 / 6502decoder Goto Github PK
View Code? Open in Web Editor NEW6502/65816/6800 Bus Protoco/Instruction Stream (for logic analysis capture files)
License: GNU General Public License v3.0
6502/65816/6800 Bus Protoco/Instruction Stream (for logic analysis capture files)
License: GNU General Public License v3.0
Any C02 processor:
} else if (instr->decimalcorrect && (em_get_D() == 1)) {
// read operations on the C02 that have an extra cycle added
Or find a workaround that doesn't require the D flag.
e.g. specify address and number of instructions
I added an extra 'i' to the -ifclk parameter. fx2pipe does not react gracefully:
:)
paganini@Ariel:~$ sudo fx2pipe -ifclik=xi -n=4k >16.bin
Segmentation fault
paganini@Ariel:~$ uname -a Linux Ariel 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linu
This was captured on the Master with the DIP Clip (Phi2 on Pin 39 Clk0In) running *BCDTEST (disk 259)
4473001 8b 0 0 1 0
4473002 20 0 0 1 0
4473003 00 0 0 1 1
4473004 00 0 0 1 1
4473005 00 0 0 1 1
4473006 00 1 1 1 0
3 00 0 0 1
4473007 00 1 1 1 0
4473008 20 1 1 1 0
4473009 8d 1 1 1 1
4473010 8d 1 1 1 1
4473011 8d 1 1 1 1
4473012 8d 1 0 1 0
A81F : 8D 8B 8B : STA 8B8B A=00 X=06 Y=00 SP=EA N=0 V=0 D=0 I=0 Z=1 C=1
0 8d 1 1 1
4473013 8d 1 0 1 0
4473014 20 1 0 1 0
4473015 8c 1 0 1 1
4473016 8c 1 0 1 1
4473017 8c 1 0 1 1
4473018 8c 1 0 1 0
1 8c 1 0 1
4473019 8c 1 0 1 0
4473020 20 1 0 1 0
4473021 c2 1 0 1 1 <<<< Correct
4473022 c2 1 0 1 1 <<<< Correct
4473023 c2 1 0 1 1 <<<< Correct
4473024 8c 0 0 1 0 <<<< Missampled
2 8c 1 0 1
4473025 8c 0 0 1 0
4473026 20 0 0 1 0
4473027 00 0 0 1 1
4473028 00 0 0 1 1
4473029 00 0 0 1 1
4473030 00 1 1 1 0
3 00 0 0 1
4473031 00 1 1 1 0
4473032 20 1 1 1 0
4473033 a9 1 1 1 1
4473034 a9 1 1 1 1
4473035 a9 1 1 1 1
4473036 a9 1 0 1 0
A822 : 8D 8C 8C : STA 8C8C A=00 X=06 Y=00 SP=EA N=0 V=0 D=0 I=0 Z=1 C=1
Note, this doesn't seem to cause any failures to be flagged, but the MSB of the address in the disassembly is incorrect.
Any chance of a pre-built windows binary?
Does this support memory modelling in 65816 mode?
I'm using the following command:
decode6502 --mem=F0F --cpu=65816 -ahisy
but it doesn't seem to log memory writes nor does it pick up some "deliberate" mistakes where my d,X addressing mode was picking up the wrong byte.
00C01C : 86 03 : STX 03 : 3 : A=??03 X=007F Y=???? SP=01?? N=1 V=0 M=1 X=1 D=0 I=1 Z=0 C=0 E=1 PB=00 DB=?? DP=????
00C01E : E6 03 : INC 03 : 5 : A=??03 X=007F Y=???? SP=01?? N=1 V=0 M=1 X=1 D=0 I=1 Z=0 C=0 E=1 PB=00 DB=?? DP=????
00C020 : A5 03 : LDA 03 : 3 : A=??80 X=007F Y=???? SP=01?? N=1 V=0 M=1 X=1 D=0 I=1 Z=0 C=0 E=1 PB=00 DB=?? DP=????
00C022 : 45 03 : EOR 03 : 3 : A=??00 X=007F Y=???? SP=01?? N=0 V=0 M=1 X=1 D=0 I=1 Z=1 C=0 E=1 PB=00 DB=?? DP=????
00C024 : 85 05 : STA 05 : 3 : A=??00 X=007F Y=???? SP=01?? N=0 V=0 M=1 X=1 D=0 I=1 Z=1 C=0 E=1 PB=00 DB=?? DP=????
00C026 : E6 03 : INC 03 : 5 : A=??00 X=007F Y=???? SP=01?? N=1 V=0 M=1 X=1 D=0 I=1 Z=0 C=0 E=1 PB=00 DB=?? DP=????
00C028 : A2 02 : LDX #2 : 2 : A=??00 X=0002 Y=???? SP=01?? N=0 V=0 M=1 X=1 D=0 I=1 Z=0 C=0 E=1 PB=00 DB=?? DP=????
00C02A : B5 03 : LDA 03,X : 4 : A=??00 X=0002 Y=???? SP=01?? N=0 V=0 M=1 X=1 D=0 I=1 Z=1 C=0 E=1 PB=00 DB=?? DP=????
0
The Load at C02A is now working correctly but when it wasn't (it was bringing back 81) the registers said A=81 and I'd have expected a prediction fail.
Is it just that the 65816 emulation is not doing the memory modelling. It has been dead useful so far getting simple stuff working but now I'm getting to the more tricksy addressing modes it would be good to have it working. If it's not done for 816 - where should I start, I'm happy to put some effort in to adding it!
D
Specifically, flags to control:
(1) - rockwell (and wdc) extensions (RMB/SMB/BBR/BBS)
(2) - wdc only extensions (WAI/STP)
Currently (1) is enabled and (2) is disabled
Which matches the Rockwell R65C02 processor
Hi Dave, hope you're well!
I've been debugging a Dormann test fail, and found that the decoder doesn't seem to understand opcode 0F (BBR 0). Here's the relevant part of the Dormann listing, and the decoder's output given the byte sequence you can see here - it looks to me like it just didn't understand the 0F opcode:
4a3a : 28 > plp
>
4a3b : 0f0c06 > bbr 0,zpt,fail10279
4a3e : 8f0c06 > bbs 0,zpt,ok10279
> trap ;bbs branch not taken
4a41 : 20b273 > jsr report_error
3866098 3afdf2 0 28 ? ? ?
3866099 3afdf3 1 0f ? ? ?
3866100 3afdf4 2 00 ? ? ?
3866101 3afdf5 3 00 ? ? ?
Rd: 4A3A = 28
Rd: 01FF = 00
4A3A : 28 : PLP : 4 : A=33 X=11 Y=22 SP=FF N=0 V=0 D=0 I=0 Z=0 C=0
3866102 3afdf6 0 0f ? ? ?
Rd: 4A3B = 0F
4A3B : 0F : ??? : 1 : A=33 X=11 Y=22 SP=FF N=0 V=0 D=0 I=0 Z=0 C=0
3866103 3afdf7 0 0c ? ? ?
3866104 3afdf8 1 01 ? ? ?
3866105 3afdf9 2 01 ? ? ?
3866106 3afdfa 3 06 ? ? ?
3866107 3afdfb 4 8f ? ? ?
3866108 3afdfc 5 0c ? ? ?
Rd: 4A3C = 0C
Rd: 4A3D = 01
memory modelling failed at 4A3D: expected 06 actual 01
Rd: 4A3E = 01
memory modelling failed at 4A3E: expected 8F actual 01
Rd: 0101 = 06
Wr: 0101 = 0C
4A3C : 0C 01 01 : TSB 0101 : 6 : A=33 X=11 Y=22 SP=FF N=0 V=0 D=0 I=0 Z=0 C=0 prediction failed
3866109 3afdfd 0 01 ? ? ?
3866110 3afdfe 1 01 ? ? ?
3866111 3afdff 2 06 ? ? ?
3866112 3afe00 3 20 ? ? ?
3866113 3afe01 4 08 ? ? ?
3866114 3afe02 5 c9 ? ? ?
The command line I used was:
cat data14.bin | ../decode6502 -haisy -d 1 -b --vecrst=A2FE00 --cpu=65C02 --mem=FFF
I've also attached the data file for reference:
65816: in MVN/MVP DBR should be set to the target branch
This is barely documented, but has been discussed on 6502.org:
http://forum.6502.org/viewtopic.php?f=2&t=5737
See also:
http://www.6502.org/tutorials/65c816opcodes.html#6.6
Hi,
I'm getting a weird compiler error building this:
Making all in usb_io
make[2]: Entering directory '/home/steve/src/6502Decoder/fx2pipe/usb_io'
g++ -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I.. -g -O2 -MT wwusb.o -MD -MP -MF .deps/wwusb.Tpo -c -o wwusb.o wwusb.cc
In file included from wwusb.h:25,
from wwusb.cc:22:
/usr/include/linux/usbdevice_fs.h:134:41: error: flexible array member ‘usbdevfs_urb::iso_frame_desc’ not at end of ‘struct WWUSBDevice::URB’
134 | struct usbdevfs_iso_packet_desc iso_frame_desc[];
| ^~~~~~~~~~~~~~
wwusb.h:119:29: note: next member ‘int WWUSBDevice::URB::cancelled’ declared here
119 | int cancelled;
| ^~~~~~~~~
wwusb.h:116:24: note: in the definition of ‘struct WWUSBDevice::URB’
116 | struct URB : LinkedListBase<URB>, usbdevfs_urb
| ^~~
make[2]: *** [Makefile:218: wwusb.o] Error 1
make[2]: Leaving directory '/home/steve/src/6502Decoder/fx2pipe/usb_io'
My system is:
$ uname -a
Linux steevo 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
Thanks!
Steve
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.