Wow this is quite clever !
Apparently unlike the full canonical decoding I did, which relies only on a length table, some decoding requires the sorted canonical codes and a table of how many codes there is per length instead. In examples of length going up to 17 bits (this is what I have for my ...
Search found 149 matches
- Fri Aug 18, 2017 2:34 pm
- Forum: Programming
- Topic: Huffman decoding on a 6502
- Replies: 7
- Views: 3530
- Fri Aug 18, 2017 7:34 am
- Forum: Programming
- Topic: Huffman decoding on a 6502
- Replies: 7
- Views: 3530
Huffman decoding on a 6502
So, I successfully wrote a PC Huffman encoder in C++. I use canonical codes and only store the "huffman tree" as a 256 byte table where each byte indicate the code length of the corresponding index (or $00 if a symbol unused). Cannonical modes means that if several symbols use the same bit length ...
- Sat Jun 03, 2017 1:35 pm
- Forum: General Discussions
- Topic: Flags: N, V, Z, C - what are they worth to you?
- Replies: 31
- Views: 4449
Re: Flags: N, V, Z, C - what are they worth to you?
The processor flags as a whole are completely unnecessary if a CPU instruction set is designed that way. Instead of having instructions like "branch if ... flag is set/clear", we have "branch if RegX > RegY" or "brankch if RegX is zero/nonzero". We could even do it 65xx style and have "branch if A ...
- Mon May 08, 2017 7:22 am
- Forum: Programming
- Topic: Saving bytes, byte by byte - an example
- Replies: 19
- Views: 4080
Re: Saving bytes, byte by byte - an example
Bregalad, do any of the Nintendos use 65c02?
No.
For example, on that forum (NesDev), I keep seeing CLC, ADC #1 where INA could be used which is 1/3 as many bytes and half as many cycles, and LDA #0, STA where STZ could be used.
That's because they couldn't (and can't) be used.
Another one to ...
No.
For example, on that forum (NesDev), I keep seeing CLC, ADC #1 where INA could be used which is 1/3 as many bytes and half as many cycles, and LDA #0, STA where STZ could be used.
That's because they couldn't (and can't) be used.
Another one to ...
- Wed May 03, 2017 9:48 am
- Forum: General Discussions
- Topic: Historical question about ASCII
- Replies: 15
- Views: 3883
Re: Historical question about ASCII
I don't believe UTF-8 supports many non-Latin character sets, such as traditional Chinese. In fact, I seem to recall that pairs of UTF-16 words may be used in such cases, resulting in 32 bits being passed per character.
UTF-8 fully supports traditional Chinese.
Unicode, when encoded in UTF-8 ...
- Wed Apr 26, 2017 7:01 am
- Forum: Programming
- Topic: Saving bytes, byte by byte - an example
- Replies: 19
- Views: 4080
Re: Saving bytes, byte by byte - an example
You might be interested at this (partly written by me): http://wiki.nesdev.com/w/index.php/6502_assembly_optimisations
You pretty much summed everything up, but be careful:
- re-ordering routines to allow fall-through instead of JMP or BRA
Unfortunately this will likely end up with spaghetti ...
You pretty much summed everything up, but be careful:
- re-ordering routines to allow fall-through instead of JMP or BRA
Unfortunately this will likely end up with spaghetti ...
- Mon Mar 13, 2017 9:21 am
- Forum: Newbies
- Topic: Revolutionary no-solder wire-wrapping breakthrough!
- Replies: 26
- Views: 8420
Re: Revolutionary no-solder wire-wrapping breakthrough!
but I catch them long before I'm done, like noticing that there are already two wraps on a post that should only have one (where did the other one come from?)
And of course when this happens, the bottom connexion is the one that was wrong, leading to the need to remove half-a-dozen correct ...
And of course when this happens, the bottom connexion is the one that was wrong, leading to the need to remove half-a-dozen correct ...
- Thu Mar 09, 2017 8:24 am
- Forum: Newbies
- Topic: Revolutionary no-solder wire-wrapping breakthrough!
- Replies: 26
- Views: 8420
Re: Revolutionary no-solder wire-wrapping breakthrough!
Wire-wrapping is nothing new or revolutionary and had been there for decades. It's great but the main 2 problems are that 1) you need sockets for everything, and adapters so that everything is in DIP format and 2) it's extremely though to debug.
However you still need to solder at least 2 pins on ...
However you still need to solder at least 2 pins on ...
- Mon Jan 23, 2017 1:41 pm
- Forum: Forth
- Topic: New edition of "Programming Forth" by Pelc (July 2016)
- Replies: 18
- Views: 6046
Re: New edition of "Programming Forth" by Pelc (July 2016)
Looks great, is there a way to get this book in Switzerland ?
- Wed Nov 30, 2016 7:39 am
- Forum: General Discussions
- Topic: A new C compiler for the 6502 and derivatives
- Replies: 60
- Views: 30953
Re: A new C compiler for the 6502 and derivatives
Since this topic comes regularly (including in my own head), I made a post on NESdev summing up all current existing possibilities to code for the NES (or any other 6502 machine, really) using a high level language. I could do the same here but I do not want to maintain two separate post when I need ...
- Thu Oct 13, 2016 2:25 pm
- Forum: Hardware
- Topic: Is it suitable to use caches for 65xx ?
- Replies: 20
- Views: 4744
Re: Is it suitable to use caches for 65xx ?
There's a third advantage: multi-port memory is more expensive than single port, and wide busses are more expensive than narrow ones. A small fast memory near the CPU can afford to have wide access, and to have multiple ports. Now we can do things like fetch multiple bytes in one cycle into our ...
- Thu Sep 15, 2016 2:09 pm
- Forum: Newbies
- Topic: Few questions about my plans
- Replies: 46
- Views: 5680
Re: Few questions about my plans
I think famiclones were common in soviet-controlled countries. Some of them were even technically supperior to the Nintendo original PAL console, in the sense they supported playing NTSC games on a 50 Hz PAL TV just fine, when the official Nintendo didn't. Kinda hironic. Of course their collective ...
- Thu Sep 15, 2016 12:07 pm
- Forum: Newbies
- Topic: Few questions about my plans
- Replies: 46
- Views: 5680
Re: Few questions about my plans
Welcome !
I'll just point out a discussion we had on nesdev just a while (it's still half going on) which is also about building a new retro system out of retro parts. You'll probably be interested. : http://forums.nesdev.com/viewtopic.php?f=5&t=14766
I'll just point out a discussion we had on nesdev just a while (it's still half going on) which is also about building a new retro system out of retro parts. You'll probably be interested. : http://forums.nesdev.com/viewtopic.php?f=5&t=14766
- Fri Sep 09, 2016 6:21 am
- Forum: Forth
- Topic: What is Forth?
- Replies: 148
- Views: 187250
Re: What is Forth?
strings and memory allocation are not part of C
Sorry, but strings are part of C. The oft-used functions from <string.h> might not, but the string themseves, surrounded by "", are definitely part of the language. To the point that, if you want to write a C program and have another type of string ...
Sorry, but strings are part of C. The oft-used functions from <string.h> might not, but the string themseves, surrounded by "", are definitely part of the language. To the point that, if you want to write a C program and have another type of string ...
- Thu Sep 08, 2016 11:37 am
- Forum: Forth
- Topic: What is Forth?
- Replies: 148
- Views: 187250
Re: What is Forth?
I am neither for or against any language, including Forth. I was just pointing out it's usage outside of this forum is extremely marginal, which do not mean the language is any better or worse than anyother.
I learned the basics of Forth because enthusiasts on 6502.org convincted me to do so, and ...
I learned the basics of Forth because enthusiasts on 6502.org convincted me to do so, and ...