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

Thread: Commodore C64 Emulation on a Teensy 3.6 Microcontroller

  1. #26
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,242
    Hi,
    I don't know.. it really should work without problems. Have you tried to remove the normal SD library ? At least this should work.

    For comparison, my output is:
    Code:
    Bibliothek Teensy64_new im Ordner: C:\Users\Frank\Documents\Arduino\libraries\Teensy64_new (legacy) wird verwendet
    Bibliothek SdFat-master in Version 1.0.3 im Ordner: C:\Users\Frank\Documents\Arduino\libraries\SdFat-master  wird verwendet
    Bibliothek SPI in Version 1.0 im Ordner: C:\Arduino\hardware\teensy\avr\libraries\SPI  wird verwendet
    Bibliothek Audio in Version 1.3 im Ordner: C:\Arduino\hardware\teensy\avr\libraries\Audio  wird verwendet
    Bibliothek SerialFlash in Version 0.5 im Ordner: C:\Arduino\hardware\teensy\avr\libraries\SerialFlash  wird verwendet
    Bibliothek reSID im Ordner: C:\Users\Frank\Documents\Arduino\libraries\reSID (legacy) wird verwendet
    No mention of SD

    Seems that I have to fork the Audio-lib and add it to the emu-code to get rid of the includes of sd.h

  2. #27
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,242
    ron2way: I've decided to make my own audio-library for the emu. It will only have a copy of the needed audio-dac, without references to SerialFlash, Wire, or SD.
    Please wait a few days - I want to add some other things before I start with that. I hope that I can do it next weekend.
    I addition, it will completely remove other teensyduino-core things that slow down the emu unnecessarily.

    Then, i've noticed that fastloaders do not work with IEC. That's the next important thing on my list.. I hope I can solve that...

  3. #28
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,242
    Latest update to version 08 is on GitHub now:

    + VGA (work in progress)
    + PS/2 Keyboards (optional)
    + Remove teensy Audio-Library - just copied the output_dac.* files from the official lib
    - removed "SD.h" from lib, there shouldn't be any conflicts anymore.
    + minor impovements

    Please take a look at settings.h to configure.

  4. #29
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,242
    I have a fastloader (jiffydos-like) partially working - that means the timing must be close to OK.


    LOL... is anybody interested in this and this project ? I'm talking with myself...
    Maybe it's better to stop and spend time more meaningfully?

  5. #30
    Junior Member
    Join Date
    Apr 2017
    Posts
    6

    Compiling Solved!

    At last a successful compile after downloading your changes. Compiled on a linux64 but had to use a win7 machine to load the hex file to the teensy.

  6. #31
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,242
    Update:

    - "Bruce Lee" works now. Challenge finished. Sorry guys
    - Fastloader "Jiffydos" works

    I want to make it a bit nicer, update follows today. My workaround to make fastloaders work - which need a very exact timing was to disable the screenrendering during loading.

    @ron2way: great !
    Last edited by Frank B; 10-08-2017 at 12:04 PM.

  7. #32
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,242
    Anybody interested in a VGA Version ?
    My preliminary board looks like this:


    Click image for larger version. 

Name:	2017-10-10 22.27.25.jpg 
Views:	18 
Size:	83.9 KB 
ID:	11745
    Because the demand is very small, I ask before continuing and will only finalize the final board if there is demand for the VGA version.
    Edit: It has a easy to solder SMD IC ("SOIC") for 3V<->5V conversion on the backside. The board can be used for other projects, too. Perhaps the 5V bidirectional pins are useful ?
    Last edited by Frank B; 10-11-2017 at 10:40 PM.

  8. #33
    Junior Member
    Join Date
    Apr 2017
    Posts
    6
    I will purchase one.

  9. #34
    Junior Member
    Join Date
    Oct 2017
    Posts
    1
    I am also interested, any options to pre-order at this time? Please let me know if I can pre-order.

  10. #35
    I'm interested in a vga version too..

  11. #36
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,242
    Ok..:-)

    I'm almost through with testing the preliminary board - so far, everything works (with additional diode as protection). 20x Fastloading with Jiffydos + SD2IEC seems to work, too (but a bit more testing is required).
    ( I don't know any other emulator that can do this with real hardware.. are there any ? I'd like to know..)
    Screen-refresh + Sound is disabled during IEC access (would be a little too much work for teensy..)

    Just played one of my old fav games, "Bruce Lee" on this board + 22'' display.

    TBD:
    - fix board, order... takes some time :-(
    - add code for correct right- and left borders on VGA

    I'm going to order a cheap VGA->TV converter too, for testing.
    Last edited by Frank B; 10-12-2017 at 09:39 PM.

  12. #37
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,242
    For Jiffydos: You need the Jiffydos kernal eprom-file for the C64. Convert it with a tool like "bin2h.exe" to a c-header file, take the output and insert into "roms.cpp" as "const unsigned char rom_kernal[8192]="
    You might want to leave the original as is and use "#ifdef" to switch between both versions.

    Later, I'll add a menusystem to the emulator which can select the desired ROMs and other things.

  13. #38
    Senior Member KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    2,987
    Thought I would mention I assembled one over the last couple of days.

    Click image for larger version. 

Name:	Frank_Board_1.jpg 
Views:	6 
Size:	125.2 KB 
ID:	11806Click image for larger version. 

Name:	Frank_Board_2.jpg 
Views:	5 
Size:	125.5 KB 
ID:	11807

    As I am the Tinkering type, I made a few minor mods to the assembly. In particular I used long breakout pins on the Teensy, such that it makes it easier to jumper pins on the Teensy to other stuff like breadboard as well as nice place to hook up Logic Analyzer. In the past I purchased some from Adafruit and some from sparkfun (https://www.sparkfun.com/products/12693)

    I also used some standoffs, such that it can sit on ground without having the Teensy hit...

    So far the only thing I have tested out is the USB Host code and verified i could talk to a Keyboard...

    Next up figure out how to install the Commodore 64 code to try it out. It is unfortunate that we got rid of my Wife's C64 and all of the games a long long long time ago. Likewise I no longer have my Amiga.

    I should mention that the board is easy to assemble. With my boards I have to constantly look at the schematic and board layout to find which parts go where...
    As you maybe can see the differences in this picture:
    Click image for larger version. 

Name:	Frank_and_Well_Board.jpg 
Views:	8 
Size:	29.9 KB 
ID:	11808

    Also maybe try out some of my other ili9341_t3n library code to see if it works OK on this board... Should once I track down which PINS connect.

  14. #39
    Senior Member defragster's Avatar
    Join Date
    Feb 2015
    Posts
    4,809
    Kurt: Check this out for pin connects :: github.com/FrankBoesing/Teensy64 /T64_PinMapUse.txt
    { Frank - it doesn't look like I found a #define or anything for the DAC pin used }

    On assembly - Yes Frank has done some good work! The Version like this with ILI9341 is currently available and AFAIK will still be supported - but it is a good general purpose display and USB board. The VGA board may be coming along and offer the same setup - with VGA video option ( and other minor interface part changes ).

  15. #40
    Senior Member KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    2,987
    Thanks Defragster - I verified my display test program works Next up try to install the C64 stuff... But might be awhile - power out, running on generator

  16. #41
    Senior Member defragster's Avatar
    Join Date
    Feb 2015
    Posts
    4,809
    Quote Originally Posted by KurtE View Post
    Thanks Defragster - I verified my display test program works Next up try to install the C64 stuff... But might be awhile - power out, running on generator
    Awesome you got Display working - now you can post USB_HOST status/debug on local screen as you work. I went through Frank's code and pulled those pins out to that file knowing without them the board would seem 'single use'. Frank went over it and made some edits so it should be right and helpful for all pins wired.

    Yes Kurt, we are having a windy day aren't we - our lights have only flickered so far. Dropped once yesterday and I swapped my UPS that had about 0% reserve just hibernated on any dip ( or when my laser printer fired up the fuser ) - as I type new UPS kept machine up across a dip that dropped 2nd display and other stuff.

    C64 stuff was good an easy when I did it. Just need a lib or two and I got it working. Have not recompiled recently with newest IDE/TD but there are README notes on Github that should get you there - post any issues.

Posting Permissions

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