CRT Emulation?

append delete PhantombrainM

Hey there,

as I see the Mega65 has HDMI and modern resolutions.

What about CRT Emulation? Ist something like this planned?

I only like my C64 on a real tube. I think it looks horrible without rasterization, pixel blending, scanlines, some kind of blurr and so on. Even a real C64 on a TFT is looking horrible and the picture has nothing to do with the look the designers had in mind back in the days.

Same thing for the Mega65 I think and also for the included C64 Mode.

This question is currently also being discussed on German Forum64.

There are some good software NTSC and TV Effects out there, even good open source ones but not any FPGA ones I've heard of yet.

So do you think I and other's who love the retro look will be satisfied with the Mega65 Output?

Reply RSS


append delete #1. MIRKOSOFT

I think most of users don't want exchange modern SD card data access to old, but retro looking, real 1541 floppy drives without any acceleration...
When you look at many places where is info about M65 you can see: 8-bit computer for 21st century...
Ok, it can be realized by converter to composite video, but how you want to use higher resolution than 720x(480 NTSC)/(576 PAL), maybe 768H?
Or want you lack new VIC-IV modes?
Ok, if you want - use it!
In my eyes C128 VIC-IIe can produce 11 new colors which are without TV blur not possible to display.
One missing thing for me is lightpen, current displays can use pens or touch, but rather want to add support for current pen/touch possibilities than old lightpens.
If is main reason retro-feel, are you using seriously your retrocomputer? This is my Q to you...

append delete #2. gardners

Funny you should mention composite output today. We were only talking about this in our weekly meeting. We have a couple of plans for how we can implement real and authentically blurry composite video output. We are not sure if they will be implemented initially, but we are making provision for them.

As for light pen, we haven't looked at supporting a light-pen yet. There would be problems with doing this on an LCD display, as you don't have a bright beam to sync to, so it would be CRT only, even if we can implement it.


append delete #3. PhantombrainM

Wow, I didn't expect this.
Thank you Mr. Gardners. I will definetly buy and or kickstarter this project.
Have a look at MAME. There are a lot of open gl filters an even a guy from nvidia wrote some open source CRT code.
Im not sure if you can use this code to implement it in FPGA Software since I'm not a programmer.
OpenEMU (on mac) has also a very very(!) Nice NTSC Effect with chromatic abberation and so on. Sourcecode available. It's one of the best I've seen so far.

@Mikrosoft: Even with higher resolution output (and C65 1024x400 is not high resolution) this CRT masks look very nice and real when applied before sending it to 1080P Output.

I could provide pictures but check it our yourself. MAME ist hard to configure though.

append delete #4. gpz

actually on FPGA such CRT emu is kindof easy... BUT you need a bunch of multipliers and it eats memory bandwidth (which is probably why none of the existing projects implements it yet)

append delete #5. PhantombrainM

@gpz: Do you think the Mega65 Board is capable of doing such things?

append delete #6. gardners

First up, as mentioned elsewhere, we intend to have real composite out, for the genuine experience.

Second, as groepaz mentioned, it is possible to implement these sorts of filters in an FPGA. The trade-off involves memory bandwidth, and as I understand it, having enough of a buffer while outputting a frame of video, that the necessary nearby pixels can be retained to input into the filter.

A cheaper approximation can be done by just blurring horizontally, and varying the brightness of each physical raster line based on where in the composite raster line it falls.

append delete #7. gpz

simply said, you need one line "backbuffer" (simulating the PAL "delay line") and then one matrix multiplications plus some linear interpolation and moving average per pixel. its a lot of memory lookups, which kinda sucks =) (for a "perfect" simulation you need to actually encode and decode composite video, which involves even more lookups and multiplications - most software implementations i have seen dont do this either)

append delete #8. gardners

Yes, these things are not as nice and simple as we would like. We will see how we go in terms of available BRAM to hold the delay line and spare capacity in the FPGA. The nice thing is that the Artix7's have lots of multipliers built in.

append delete #9. Ratteler

Isn't this kind of artifacting what LUMAFIX 64 was created to correct?
...and you want them to EMULATE it?

append delete #10. PhantombrainM

@ratteler: No, Lumafix is to remove the vertical lines the vic produces on the c64 with a signal of the opposite to null it out:

I'm talking of this:
(top is a simple crt effect, bottom is whithout):

append delete #11. gpz

thats actually not a good example at all :)

the CRT emulation is mostly about reproducing the color mixing that happens horizontally and (on PAL) between alternating scanlines. see

append delete #12. Meshuggah333

CRT emulation in Vice64 is great, I have no idea how they do it but it looks very good.
They don't seem to emulate composite but a slightly blurry desaturated svideo signal. You can set scanline shade level, blurring (horizontal I guess), Odd lines phase and offset.
Something close to that would be good enough for me.

append delete #13. jimbo

Equally important to me is the recreation of the geometry of an actual CRT tube (round angles, spherical curvature, phosphor dots patterns, chromatic fringing, tube wearing); again, look at what HLSL can do with MAME.

append delete #14. gpz

that again requires a LOT of memory bandwidth and also processing power per pixel (which is why the existing implementations use shaders) - i doubt it can be implemented in a reasonable way on the mega65

append delete #15. jimbo

So what's the plan for recreating somehow the CRT look & feel?
Wouldn't be possible to dedicate an FPGA core or an entire FPGA to the task?
Being a longtime user of emulators and old consoles I know that a CRT, real or emulated, is essential to the authentic experience; modern displays used directly are simply ugly to see.
I hope that a solution is possible.

append delete #16. Meshuggah333

I, too, think convoluted filtering like CRT geometry with phosphor emulation is way out of reach for this project. A simple yet convincing filtering shouldn't be too taxing on resources.
This filter, if it's implemented, should be an option you can switch on or off at will ( in a config pannel of some sort I guess ). A per screen-mode configuration of said filter would be awesome!

append delete #17. gardners

We will first get the machine working, and then see what resources remain to add niceties, like improving CRT emulation. But as Groepaz points out, we aren't going to hit perfection.


#18. LGB

This post was deleted by its owner

append delete #19. Truss

When I read about the Mega 65, it was a dream come true for me.
I have always wanted a C65 like computer.

When I read the comments on many of the subjects in here, it feels like people are more interested in the C64 emulation, than the C65 (As it really is).

Why not let them make the Mega 65, and let the C64 stuff come in as a bonus?
-Commodore made the C65 "Commodore 64" compatible, but not in a sense that it would be working 100%

I see the Mega 65 as a new 8 bit computer with lots of potential and I am *really* looking forward to see it complete.
Keep up the good work!

append delete #20. LGB

@Truss: I don't know, but Commodore 65 is intended to be C64 compatible at some degree at least ... So about the Mega65, if it wants to carry the original concept of C65 further, should not forget about the roots. However that's true: even the original C65 was not meant to be a 100% compatible C64 in C64 mode (well, just the CPU is not the very same - think about illegal opcodes -, and so on), that's the other point. And I think, C65GS/Mega65 has already a great work to even lighten this limitations of the original design (for example: think about the incompatibility caused by the different behaviour of read-modify-write opcodes of 65CE02 core, which is already solved - if I know well - for Mega65).

But I agree, that only "an FPGA C64" it wouldn't be as interesting as Mega65 is, there are projects already like that. C65 is an interesting (however it was way so late to be developed by Commodore, IMHO) machine, and with the original concept, and a proper case/keyboard/etc it really feels as a brand new (and quite modern) 8 bit machine, which is a great feeling! It's just another - though very important! - point, that Mega65 has even more developments over the C65 features, for me, this makes it even more interesting and a "must have" item :) Personally, I felt something similar with C64DTV, that I have something which "looks like" a 8 bit stuff (and not only a software emulation), which carries the original concepts further, and "just can be bought" and ready to be discovered, etc. Mega65 is even better with a proper case, and the general feeling about being a "real computer", which is not so much the case of C64DTV (well, it's just a "joystick", you have to hack it, etc).

But for sure this was *ONLY* my personal view, nothing more.

append delete #21. MIRKOSOFT

Yes, true words. It is at first Commodore 65 with even more enhancements. C64 is here since 1982 and is part of C65 - 64 mode, but 64 mode has also C128.
Mega 65 is bit similar like C64 with SuperCPU - C65 with enhancements.
For me is Q: Why near everybody talks about C64 mode?
It's like when anybody talks about C128's 64 mode without looking at C128 enhancements.
Please forgive me C64 fans, but how long will be C64 absolute king of Commodore 8-bits? And no matter if is here anything better...
My dream was C65 since were first news about in Czechoslovakia, I was at that time 64er, later I got C128 and 64 was gone. I own Nexys4DDR and running M65 with current bitstream is still more C64 than C65. Not all is finished. I'm sure that M65 never replaces my favorite - C128, but now is M65 second and there stay.
What a C64 feature makes C64 king? Longest production and best selling machine ever?

append delete #22. Meshuggah333

I'm more interested by the enhanced C65 part myself, I can't wait to delve into 4510 asm and have fun with the VIC-IV. On the other hand I can't count how many times I almost pulled the plug on a nice looking C64 on eBay (no latter than today T_T) so it's a very good added bonus for me.
C64 compatibility means using hacks made for it on the C65 side too, ex: I plan on building a SNES pad to C64 adapter (it allows you to use up to 8 SNES pads via the joystick ports, and even 3 SNES pads on port 2 and 1 C64 stick on port 1, great stuff) and code a few things for it. The possibility of having fun with both modes is just endless so, to me, both are important in the end :)
And don't forget the games/demos/utilities/etc library of the C64 is huge! I repeat, ENDLESS FUN!

append delete #23. LGB

@MIRKOSOFT: Interesting questions. However I think the answer is "time". Nowadays, 99.99% of people on this planet wouldn't be amused too much about *any* 8 bit like designs, simply because it's (let's be honest) already end of this era. Just people like me, you, us are interested still. But even about just me: it cannot be deleted from my heart, that C64 was my first computer, and I learnt many things I use even today (of course not in the very same form, but anyway, the basics of programming etc are not so much changed) to earn money, etc etc. Maybe not even the "features" but the timing is important. For example C65 even if it finished and released would be just "too late" for the market, and for most of the people. So it wouldn't be able to gain that status any more what C64 could. Back to then my childhood, I had a C64, and it was a quite common thing that people had C64. Now, I met youngsters (well, compared to me, I mean) who is interested in C64 (as "newcomers") as some kind of challenge, but it's not the same: their "main" machine (which is probably PC or Mac now) wouldn't be even the C64 (even if they care!) so the situation changed. But speaking about newcomers: it's not a bad thing at all, and as modern computers *are* complicated to be fully understandable easily, the "understandable computer" concept is kinda interesting, indeed. Personally I simply don't even know too much on C128 back to then here in Hungary. Now I have C128, but not so much used, just collecting computers. Anyway, what I wanted to say: since the "golden era" of 8 bit is already over, I don't think that there could be a "real new king", simply because there is no kingdom any more which needs a new king ... Fortunately, there are still people interested in. Hopefully my message is not understood in a bad way, of course I didn't want to say that it's something bad about being interested in these computers, I wouldn't be here if it is my case :) :)

append delete #24. mongooseman

I have a vga to 5 bnc cable that i use to get RGB signal from a PC to run winvice and mame on a real crt production monitor.

If the resoloution is too high it doesnt work so good.

Maybe whatever outputs you are going to implement, you should concider being able to switch resoloutions freely on the c65. Even be able to set custom resoloutions and horizontal and vertical refresh rates.

append delete #25. gardners

Changing resolutions freely is quite complicated for us to achieve, because it requires changing the video dot clock, which in true 8-bit fashion, is tied to the CPU clock speed in a variety of ways. We may be able to have a couple of modes, where those modes use integer multiples of the same pixel clock, however.


(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Deft, gardners, MARCOM