Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 64 of 64

Thread: C64 Emulation with Teensy 3.6

  1. #51
    3.3v and user port please!

    yes IEC please!

    nope no cassette port

  2. #52
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    3,766
    ok, with 3.3v only + iec + 2x joystick ports (on 3.3v, too) + display the pcb can be really "teensy" small.
    i don't think that more advanced old joysticks (with..hm, don't know how to translate it (in German "Dauerfeuer") - autofire (?) ) will work with 3.3v. But functions like this are cheating anyway ;-)

    btw... did you notice, that the T3.6 is the smallest c64 ever (if you don't count the display - only the usb is needed for the minimal version) ? ;-)
    Last edited by Frank B; 04-21-2017 at 09:58 PM.

  3. #53
    Senior Member defragster's Avatar
    Join Date
    Feb 2015
    Posts
    4,267
    Very Cool FrankB!

  4. #54
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    3,766
    A first try:

    Click image for larger version. 

Name:	c64_throughole_brd.png 
Views:	47 
Size:	35.1 KB 
ID:	10384
    It looks large - but it is exactly the size of the display.
    Userport(3Volt), 2x Joysticks (3Volt), IEC(5Volt), Audo Line Out, USB Host
    I did not find a minimum 5x DIL bidir-levelshifter that would fit - so I decided to just use the working transitor-approach.
    Very easy to solder (i hope)
    Last edited by Frank B; 04-23-2017 at 10:22 PM.

  5. #55
    Senior Member defragster's Avatar
    Join Date
    Feb 2015
    Posts
    4,267
    That looks small and simple! Good luck with unit #1

  6. #56
    Would that be like a shield for a Teensy 3.6 to snap into? Thus allowing you to remove it for other projects later on?

    Is there a port to connect a 1541 disk drive up to it?

    I am ordering a TFT screen tonight..

    Very cool project!

  7. #57
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    3,766
    After some thinking, I have a solution for the sound. I have not written one single line for it, yet, but I'm pretty sure it will work..
    I'll reduce the samplingrate to the PAL/NTSC linefrequency (15625Hz for PAL). Since the SID max freq is about 4..5kHz this will have no audible influence.
    Then, I remove the whole audio-lib from the project and just use reSID directly on a small buffer...(8..16 samples) Every scanline outputs one sample.
    This way reSID is perfectly synced with the rest and I can use the spare cycles of VIC "Badlines" to call it and fill the buffer.

    @Synthetech: Yes, that's the plan. And yes, you can remove the Teensy 3.6. One little thing: As it is needed to solder the USB-PINS it will not fit on breadboards after that. Maybe I find a solution for this "problem", too.. or just use a cable, instead ?
    The IEC Port uses the original connector - at least i hope, from the pictures it looks pretty similar - but I have to wait for it to arrive!

    @Defragster: I'll send you a beta.
    Last edited by Frank B; 04-24-2017 at 10:40 PM.

  8. #58
    Junior Member
    Join Date
    Jul 2013
    Posts
    9
    Quote Originally Posted by Frank B View Post
    After some thinking, I have a solution for the sound. I have not written one single line for it, yet, but I'm pretty sure it will work..
    I'll reduce the samplingrate to the PAL/NTSC linefrequency (15625Hz for PAL). Since the SID max freq is about 4..5kHz this will have no audible influence.
    Then, I remove the whole audio-lib from the project and just use reSID directly on a small buffer...(8..16 samples) Every scanline outputs one sample.
    This way reSID is perfectly synced with the rest and I can use the spare cycles of VIC "Badlines" to call it and fill the buffer.
    Do you know if this method will handle the digitunes like "Polly_Wants_a_Tracker.sid"? It updates the SID about once every 6us. I would also check the voices in Impossible Mission and Ghost Busters.

    It would still be great if you could just put a SID socket on your board, but I understand that isn't easy if you don't have a SID.

    David

  9. #59
    Senior Member defragster's Avatar
    Join Date
    Feb 2015
    Posts
    4,267
    Quote Originally Posted by Frank B View Post
    ... I'll reduce the samplingrate to the PAL/NTSC linefrequency (15625Hz for PAL). Since the SID max freq is about 4..5kHz this will have no audible influence.
    ...
    @Defragster: I'll send you a beta.
    Very cool and very nice Frank! Excited to see it!

    That change will free up a lot of cycles (and other resources?) for you I hope. Also sounds like using the "CPU Stall of Badlines" where normally the VIC-II stops the CPU and "spends a few dozen cycles loading in the next line of text so that it can properly index the character generator ROM for the next eight scanlines" explains why you have the opportunity/need to buffer the next 8 sound samples! Sounds like a great plan.

    I was reading a bit about the C64 - something I never used as I was off to college about then and happy with my TRS-80- and it sounds like they did amazing things with that 8 bit 'system'. Are you running T_3.6 at 180 or 240 MHz?

  10. #60
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    3,766
    @Dave, reSID is not fast enough to call it every 6us - no way.
    Even the reSID documenation says "requires fast machines" (and they meant PCs, not microcontrollers...)

    Some month ago (last year or 2015?) I recorded MP3s (Ghostbusters.DMP, LAX_UP.DMP) with a analog cable from the audioshield to the computer-line in.
    https://drive.google.com/drive/folde...2xIYUR4MU1rdzg
    DMP is a SID-Registerdump all 20ms. Teensy64 calls it way more often, but 6us is out of reach.
    Then, i'm using an old reSID version - the newer ones are needing more memory than a Teensy has available...
    Last edited by Frank B; 04-25-2017 at 07:47 PM.

  11. #61
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    3,766
    @Defragster: Making it compatible to the IEC was a task that turned out to be very complicated - not the emulation itself, but in parallel with video and sound.
    I'm still not 100%sure that it will work all together. I have have a PLAN B and C for the worst case..
    Yes, the TRS80 was great, too. In Europe, the C64 was more popular than in USA and there was (and still IS!) a very active "scene" and they wrote/write great games and demos. Most of them are not NTSC compatible. Usually these demos squeeze the last drop out of the c64-hardware (with graphic + sound effects the c64-hardware-developers never dreamed..) For example there are various new graphic-modes or it's possible to display sprites in the screen-borders (which is normally NOT supported by the chipset). If you take a look at the video, you see this effect (sprites in borders) in "Paperboy" - I'm glad that the emulation can handle this effect. It can handle some more too, but will never be as perfect as VICE. It's likely that Teensy64 will have problems with newer demos/games. But 80's or early 90's software will work ok
    Sometimes, they release new games/demos even today.

    Edit: I tend to use 240MHz because it allows higher flicker-free screen refresh rates. It may turn out that 240MHz are needed to run the emulation (at the moment 180MHz are sufficiant)
    Last edited by Frank B; 04-25-2017 at 08:08 PM.

  12. #62
    Senior Member defragster's Avatar
    Join Date
    Feb 2015
    Posts
    4,267
    Can the IEC support be set to disable on power up with a Jumper? Most often for high speed game/sound/video it wouldn't be used would it? Maybe there are more devices on it than I know - or maybe it is only active when required?

    I recall the border sprite note - that is great it handles that. Nice it can run at 180 MHz - I saw that was the speed once and wasn't sure if 240 was better or needed.

  13. #63
    Junior Member
    Join Date
    Jul 2013
    Posts
    9
    Quote Originally Posted by Frank B View Post
    @Dave, reSID is not fast enough to call it every 6us - no way.
    Even the reSID documenation says "requires fast machines" (and they meant PCs, not microcontrollers...)
    OK. Just wondering. It is one of those things that sounds good, but is impractical. (I apologize if I sound ungrateful. This is an awesome project that is way beyond my abilities.)

    Still, lots of games use the regular PAL/NTSC update frequencies, so I'm still in for at least one board.

    David

  14. #64
    I blame this thread for me in trying to aquire a real c64 no power supply but price was good. $12 shipped.
    now to aquire more never have enough c64 stuffs.. and yes I will likely purchase one of these boards too

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •