Search found 21 matches

by aleferri
Wed Jun 23, 2021 10:56 am
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

Ok, guys. Flags are hard. They are the worst part of the design. I made them addressable and i regret doing it.
I regret it so much that now i will remove addressable flags and put 2 special instructions to load and store flags. This will simplify the design a lot.
by aleferri
Sat May 29, 2021 4:12 pm
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

I had this weird idea about implementing interrupts and jsr/bsr with the same circuitry.
After all they look the same, push pc first and then jump to address (address = pc + offset if bsr).
I hope it doesn't turn out too difficult to manage.
by aleferri
Fri May 28, 2021 1:56 pm
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

Good news.
I fixed another ton of bugs. Now this program

Code: Select all

LDZ      #0 ?
LDS      #0
LDY      #$64
LDA      #$C000
STA      $00A0
LDA      #$B000
STA      $00A2
SUB:Y    #1 ?
LDA      byte ($00A0), Y
STA      byte ($00A2), Y
BNE      -16
Run correctly in 812 cycles.
by aleferri
Tue May 25, 2021 1:55 pm
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

Update.
it reached alpha stage. I have to fix the decoder, the internal core seems to work. Fetch seems to work too.
Simulated with iverilog. Synthesis seems to be fine with yosys.
I discarded short instructions, they are infrequent and not worth the hassle. Poor decisions were fixed (e.g. reset to ...
by aleferri
Mon May 24, 2021 10:55 am
Forum: Programming
Topic: WDC02CC Compiler
Replies: 59
Views: 7367

Re: WDC02CC Compiler

As Druzyek pointed out in another post, CC65 produces more efficient code.
I compared some code that I have been working on and found that
WDC comes in at 1922 bytes (CODE)
CC65 comes in at 1860 bytes (CODE)
In fact CC65 does even better as I had to remove the UTOA function from WDC as it was not ...
by aleferri
Mon May 24, 2021 9:12 am
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

You are wise to avoid 64 bit extension until the instruction pipeline is working. FPGA addition is O(n log n) and therefore basic functionality, such as ALU, may bloat more than expected - with consequent performance loss. (Even when treating a microcontroller as a convenient microcode ...
by aleferri
Sun May 23, 2021 12:46 pm
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

Hi Sheep64!
Well, point per point:


I am alarmed when people work at a blistering pace. I think that I'm either making hard for myself, the other person has missed a fundamental problem or they have vastly more talent than me. Given your apparent competence with instruction pipelines and micro ...
by aleferri
Tue May 18, 2021 10:44 am
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

Up.

Still working in the decode stage. I hope to avoid the generation of many muxes.
by aleferri
Sun May 09, 2021 1:03 pm
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

Fetching unaligned opcodes is bad. It require 3 port memory and double the amount of logic (2 adders, 1 for PC, 1 for Next).
It could have been worst, i had only 16b/32b ops. Original 6502 with 8b/16b/24b would have been a mess.

On the good news i mostly need to port the decoder to verilog to ...
by aleferri
Fri May 07, 2021 6:20 pm
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

There are some bug in LogicCircuit regardings bits. With the complexity of the back end, some bits become missing, then they reappear at the next cycle. I found a few bugs in the decoding and a miscalculation of timing, i accidentally overwrite a value in the constant register one cycle before it is ...
by aleferri
Thu May 06, 2021 10:13 pm
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

It's me again.

The following program now correctly gets decoded by the Front End:

_reset: LDA:Y #100
LDA:A #$C000
STA:A $A0
LDA:A #$B000
STA:A $A2
_loop: SUB:Y #1 ?
LDA:A byte ($A0),Y
STA:A byte ($A2),Y
BNE _loop
LDA:A #0
STA:A byte $FFFF ; stop the clock


Without manually setting the ...
by aleferri
Thu May 06, 2021 12:30 am
Forum: Programming
Topic: LLVM 6502 Codegen
Replies: 154
Views: 43323

Re: LLVM 6502 Codegen

mysterymath, are you using cc65's routines for signed comparisons, 32 bit arithmetic, etc?
Or are you developing them independently?

EDIT: spelling
by aleferri
Thu May 06, 2021 12:17 am
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

New Update:
I must have been drunk when i wrote "Fetch now works".

I found 4 bugs in 5 minutes this evening:
1) My CPU ops are 16 or 32 bit. I did not even put the required signal (pc_inc_2) in the fetch module. Now resolved.
2) I forgot about the behaviour of the hold signal. Now fixed.
3) Fetch ...
by aleferri
Wed May 05, 2021 9:51 pm
Forum: Emulation and Simulation
Topic: Personal 6502 "evolution" project
Replies: 23
Views: 4918

Re: Personal 6502 "evolution" project

BigEd wrote:
(Thanks - but please could you attach a PDF too?)
Yes, sorry.
by aleferri
Wed May 05, 2021 7:32 pm
Forum: General Discussions
Topic: Apple IIgs OS updated unofficially in... 2017?
Replies: 21
Views: 2422

Re: Apple IIgs OS updated unofficially in... 2017?

BillG wrote:
ProDOS is still being updated as well.

https://prodos8.com/releases/prodos-242/
Is it open source or proprietary?