To answer your earlier question, I too get 7f:800000 as my answer for 1-2, which means it was actually working, I just didn't understand how that representation was supposed to be interpreted.
If 80:800000 is -2, and following your logic, I could see that being reasonable, then it follows that 7f ...
Search found 13 matches
- Wed Jan 04, 2023 2:01 am
- Forum: Programming
- Topic: Trying to grok the Woz FP routines
- Replies: 13
- Views: 10175
- Tue Jan 03, 2023 10:54 pm
- Forum: Programming
- Topic: Trying to grok the Woz FP routines
- Replies: 13
- Views: 10175
Re: Trying to grok the Woz FP routines
I have not looked deeper into the woz code for some times, but I compiled a small test program with vbcc using the woz library and checked a few of your steps.
Hopefully that helps a bit?
Nope, it doesn't. It helps a lot :D
I think what is apparent is that I need to understand the FP format ...
Hopefully that helps a bit?
Nope, it doesn't. It helps a lot :D
I think what is apparent is that I need to understand the FP format ...
- Tue Jan 03, 2023 12:10 am
- Forum: Programming
- Topic: Trying to grok the Woz FP routines
- Replies: 13
- Views: 10175
Trying to grok the Woz FP routines
So I'm trying to figure out what's going on here - I'm having a go at writing a high-level compiler for the 6502, and it'd be nice to have a 'float' datatype, but I'm not managing to understand '1-2' at this point :)
I wrote a little routine to convert a float to 'woz' format, and it gives me ...
I wrote a little routine to convert a float to 'woz' format, and it gives me ...
- Tue Dec 12, 2017 7:11 pm
- Forum: Programmable Logic
- Topic: Arlet Ottens 6502
- Replies: 27
- Views: 11045
Re: Arlet Ottens 6502
hoglet wrote:
Why not just run Klaus Dormann's excellent 6502 functional test suite?
https://github.com/Klaus2m5/6502_65C02_functional_tests
https://github.com/Klaus2m5/6502_65C02_functional_tests
... because I didn't know about it
- Tue Dec 12, 2017 7:01 pm
- Forum: Programmable Logic
- Topic: Arlet Ottens 6502
- Replies: 27
- Views: 11045
Re: Arlet Ottens 6502
I wasn't expecting it to be actively destroyed, that's all. It starts off as 0xFF at the beginning of the reset sequence and state BRK3 turns it into XX. I can work around that ...
The reset sequence follows the same state transitions as BRK does, which normally results in PCH, PCL and P being ...
- Tue Dec 12, 2017 5:43 pm
- Forum: Programmable Logic
- Topic: Arlet Ottens 6502
- Replies: 27
- Views: 11045
Re: Arlet Ottens 6502
Well, apart from figuring out why the stack pointer is undefined :)
On an original 6502, reset does not initialise the stack pointer. So Arlet's core is correct here.
To get a sane value, you need to execute LDX #$FF then TXS.
Dave
Ok, makes sense I guess.
I wasn't expecting it to be ...
- Tue Dec 12, 2017 5:22 pm
- Forum: Programmable Logic
- Topic: Arlet Ottens 6502
- Replies: 27
- Views: 11045
Re: Arlet Ottens 6502
Hmm. Ok, yes I can see that if I extend the 'check' function in the testbench by another clock, A <= 0 in the clock before reset is asserted. Cool - I didn't actually know the register-updates were delayed that much.
Ok, so I can adapt the testbench to that, and hopefully we're done :) Well, apart ...
Ok, so I can adapt the testbench to that, and hopefully we're done :) Well, apart ...
- Tue Dec 12, 2017 3:45 pm
- Forum: Programmable Logic
- Topic: Arlet Ottens 6502
- Replies: 27
- Views: 11045
Re: Arlet Ottens 6502
So, mea culpa.
I put (PC-1) into the reset vector, because I misunderstood one of the bus-read cycles. Putting the actual *correct* vector (of PC) into the reset vector fixed that particular issue. I can see the 'ASL A' instruction appear during the DECODE cycle:
Image no longer available: http ...
I put (PC-1) into the reset vector, because I misunderstood one of the bus-read cycles. Putting the actual *correct* vector (of PC) into the reset vector fixed that particular issue. I can see the 'ASL A' instruction appear during the DECODE cycle:
Image no longer available: http ...
- Tue Dec 12, 2017 2:37 am
- Forum: Programmable Logic
- Topic: Arlet Ottens 6502
- Replies: 27
- Views: 11045
Re: Arlet Ottens 6502
... If I put byte 0xa0 (ASL A) into memory at the location pointed to by PC ($0000), set the interrupt vector to be (PC-1) and let the clock run for a bit, I see the below ...
Forgive me if I'm being unintentionally patronizing (or clueless of the true nature of your problem), but:
0xa0 is the ...
Forgive me if I'm being unintentionally patronizing (or clueless of the true nature of your problem), but:
0xa0 is the ...
- Mon Dec 11, 2017 7:06 pm
- Forum: Programmable Logic
- Topic: Arlet Ottens 6502
- Replies: 27
- Views: 11045
Re: Arlet Ottens 6502
Yep, agreed, but this is only in simulation, and I'm actually using iverilog/gtkwave, so there's no chance of the extra clock delay being introduced.
Looking at the signals, they seem reasonable - the data is appearing one clock after the address is presented. I did realise (after posting the main ...
Looking at the signals, they seem reasonable - the data is appearing one clock after the address is presented. I did realise (after posting the main ...
- Mon Dec 11, 2017 6:06 pm
- Forum: Programmable Logic
- Topic: Arlet Ottens 6502
- Replies: 27
- Views: 11045
Arlet Ottens 6502
So I'd like to use Arlet's 6502 in a design, but I'm having difficulties getting it to integrate with the blockram model I'm using. If I put byte 0xa0 (ASL A) into memory at the location pointed to by PC ($0000), set the interrupt vector to be (PC-1) and let the clock run for a bit, I see the below ...
- Tue Nov 28, 2017 1:06 am
- Forum: Programmable Logic
- Topic: Survey of FPGA dev boards
- Replies: 113
- Views: 119620
Re: Survey of FPGA dev boards
Another vote for the Zturn , and a mention that there's now a ' lite ' version as well which has a Zynq7007S (single-core ARM) but still manages 23k logic cells for the princely price of $69 (£51) or $75 (£56) for the 7010 version. You don't get the HDMI on the 'lite boards, but the add-on "cape ...
- Mon Nov 27, 2017 7:33 pm
- Forum: Programmable Logic
- Topic: 6502-Core Comparisons: Fitting a Xilinx Spartan 2 XC2S200
- Replies: 124
- Views: 118144
Re: 6502-Core Comparisons: Fitting a Xilinx Spartan 2 XC2S20
I've been playing with Arlet Ottens core (using the stock latest code from github) on a zynq 7020. It happily meets timings (ie: post place/route) with an 11ns clock (50% duty cycle for ~91 MHz) and has the following utilisation ...