|
No palettes, just direct RGB values and direct conversion to analog via a small resistor network. 8 bit RGB is easy, just as is 1 bit. I just hope that 4 bit RGB is somewhat useful. 4 bit RGBI looks usable. It provides the obligatory screaming colors for an 8 bit computer.
honey the codewitch wrote: an old game console with better graphics than its little CPU really warranted. That's the real problem here. If you choose too high a resolution or color depth, the poor CPU can't keep up the frame rate. The second bottleneck is pumping out the graphics data to the monitor fast enough. The direct approach quickly falls apart when the memory access time becomes more than an insignificant fraction of the length of the pixel clock cycles. But yes, even ordinary SRAMs are quite fast these days and the pixel clock is going to be at a relatively low frequency to support the very low resolutions.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Got me thinking...Umm is your beastie going to use analog or digital video, analog would get around the bottle neck I think but these days you are going to have to hunt something with UHF input, there not so common these days. DVI is a pain to get licences for (vendor ID's and some nonesense), VGA is pretty much the only way to go...
|
|
|
|
|
Actually I'll probably just be ripping off a subset of C#
It will target the codeDom because I'm sick of ugly codedom building code.
So instead you'll be able to write your codeDom code in a subset of C#. I've got to figure out how to context switch or otherwise introduce dynamism into it though. Should be interesting.
Or maybe I'll just make a visitor such that you can build the tree out in the C# subset and then use the visitor to modify, trim or otherwise add to it.
If any of you use the codedom and have ideas, feel free to chime in. It doesn't have to be C# specific, that's rather the point. =)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I, for one, I am keen on that Honey# language! :P
BTW you might want to check out starklang!
|
|
|
|
|
What I endeavor to do is write it in a similar fashion to how C# was written, as a recursive descent parser, meaning I'm using the hand-rolled stuff from PCK but I'm including a tokenizer.
That link you gave me led me here Stark - Tokens specification and Tokenizer implementation | xoofx[^]
Which gives me a good starting point for my own lex specs used with this parser.
Basically I'm building a hand written parser, but one that uses a tokenizer/lexer
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I'm not very familiar with the codeDOM but you might want to check out the Expression Tree API. It allows building dynamic low-level code using C# code which is similar to what I think you want to do. It also takes the approach of immutable classes that represent code with various visitors to traverse and modify the tree. Might give you some ideas!
|
|
|
|
|
That's not quite what I want as those are binary, and I'm looking to do source level integration. It also cannot be entirely immutable/stateless
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Ah! I think what you're doing is a wee bit outside of my area of experience then
|
|
|
|
|
It's kind of the house that jack built. Currently to render my shared codebase (such as table tokenizing support) in a language independent manner I have to render the entire thing using the codedom, as expression trees won't give me source code, and can't define whole classes.
Here's what I'm doing now:
var result = CD.Struct("Token", false,
CD.Field(typeof(int), "Line", MemberAttributes.Public),
CD.Field(typeof(int), "Column", MemberAttributes.Public),
CD.Field(typeof(long), "Position", MemberAttributes.Public),
CD.Field(typeof(int), "SymbolId", MemberAttributes.Public),
CD.Field(typeof(string), "Value", MemberAttributes.Public));
result.CustomAttributes.Add(_GeneratedCodeAttribute);
return result;
in order to declare this:
public struct Token
{
public int Line;
public int Column;
public long Position;
public int SymbolId;
public string Value;
}
And never mind methods like this:
result.Statements.AddRange(new CodeStatement[] {
CD.If(CD.Invoke(input,"MoveNext"),
CD.IfElse(CD.NotEq(state,CD.Literal(_BeforeBegin)), new CodeStatement[] {
CD.Let(position,CD.Add(position,CD.One)),
CD.IfElse(CD.Eq(CD.Literal('\n'),current),new CodeStatement[] {
CD.Let(column,CD.One),
CD.Let(line,CD.Add(line,CD.One))
},
CD.IfElse(CD.Eq(CD.Literal('\t'),current),new CodeStatement[]
{
CD.Let(column,CD.Add(column,CD.Literal(_TabWidth)))
},
CD.Let(column,CD.Add(column,CD.One))))
},
CD.IfElse(CD.Eq(CD.Literal('\n'),current),new CodeStatement[] {
CD.Let(column,CD.One),
CD.Let(line,CD.Add(line,CD.One))
},
CD.If(CD.Eq(CD.Literal('\t'),current),
CD.Let(column,CD.Add(column,CD.Literal(_TabWidth-1))))
)
),
CD.Return(CD.True)),
CD.Let(state,CD.Literal(_InnerFinished)),
CD.Return(CD.False)
});
return result;
to declare this:
bool _MoveNextInput()
{
if (_input.MoveNext())
{
if (_BeforeBegin != _state)
{
++_position;
if ('\n' == _input.Current)
{
_column = 1;
++_line;
}
else if ('\t' == _input.Current)
_column += _TabWidth;
else
++_column;
} else
{
if ('\n' == _input.Current)
{
_column = 1;
++_line;
}
else if ('\t' == _input.Current)
_column += _TabWidth-1;
}
return true;
}
_state = _InnerFinished;
return false;
}
It's ridiculous, and I'd like to move away from it toward something more natural.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Oof. From working with expression trees, I do know that static examples like that are usually the simplest, too. I can only imagine the monstrosity you'd have to write to support any method or struct
|
|
|
|
|
That's already abbreviated immensely.
normally you have to do like
var state = new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),"_state");
var letStateOne = new CodeAssignStatement(state,new CodePrimitiveExpression(1));
just to render
this._state=1;
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Quote: So I've decided to make my own programming language
I was pretty sure about that.
Good luck!
|
|
|
|
|
|
and I'm using Rolex for my lexing. Got it set up as a pre-build event in my new project and everything.
You baited me. I blame you.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
|
So obvious!
|
|
|
|
|
|
=/
It was either take it up again or stay home for thanksgiving as I wouldn't have been good company. So I smoked.
My hubby is disappointed. He'll survive.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the codewitch wrote: He'll survive.
A bit longer.
|
|
|
|
|
Then you weren't ready yet - and you have to have your mind on side with this: if you aren't ready to give up, you won't. You'll find reasons - any reason - to give up giving up and go back to it.
So don't get discouraged: try again later. Perhaps join a support group - most US states have a helpline that can get you in touch with free ones. Just knowing you aren't the only one going through it can help.
But for 's sake: don't give up as a new year resolution. Those rarely last the week ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
#trueFacts
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I'm quite disappointed as well
But [insert encouraging words here].
So I just know you can do it
|
|
|
|
|
After scouring the internet even, I have to admit I have no code to control nicotine addiction.
I think I may have to cook something up in C++ for that.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
In our country, the tax(actually excise) is just phenomenal and raised twice a year by a fixed percentage.
A decade ago, 20 smokes would cost you about $10 or $11. These days, a cheaper, nastier pack of 20 costs about $24. At the same time, Chemist Warehouse has nicotine containing chewy, available in 4mg pellets, 200 of them for 30 bucks.
There's a way to stay human and avoid turning into Witchy-Poo (what a fun find!) every time the levels of the neurotransmitter impostor drop low enough.
Continuing to consume nicotine is good if you're interested in holding off Parkinson's or Alzeimher's. Smoking it might mean you don't last long enough for the positive effects in staving off degradation of the Substantia nigra to matter.
|
|
|
|
|
That's interesting. I didn't know that about nicotine. =)
And sheesh, I thought smokes here were taxed to death. They still cost less than half of what you pay there.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|