Forum Rule: Always post complete source code & details to reproduce any issue!
Page 9 of 10 FirstFirst ... 7 8 9 10 LastLast
Results 201 to 225 of 248

Thread: [posted] Commodore C64 Emulation on a Teensy 3.6 Microcontroller

  1. #201
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Quote Originally Posted by Cyb3rn0id View Post
    NumLock feature doesn't work. When I hit num/lock for the joystick swap, board stucks, neither CRT ALT CANC reset, I must disconnet power
    @others do you have this problem, too?

    Quote Originally Posted by Cyb3rn0id View Post
    Sometimes screen initialization fails: screen is shifted
    might be your display, or a connection problem.
    The display-spi ist very fast, pls connect it directly to the board - no cables!

  2. #202
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    I ordered 3.2'' SPI ILI9341 display in China, I am very curious if it works.
    Last edited by Frank B; 04-18-2018 at 08:55 PM.

  3. #203
    Junior Member
    Join Date
    Apr 2018
    Location
    Sweden
    Posts
    16
    Quote Originally Posted by Frank B View Post
    I ordered 3.2'' SPI ILI9341 display in China, I am very curious if it works.
    Two months of waiting for shipment then?

    With the same type of connection or flat cable? (the latter one, I've seen on AliExpress etc)
    Would be fun with a slightly larger screen than the current 2.4" (yes, I went for 2.4 instead of 2.8 - didn't want to wait too long )

  4. #204
    Junior Member Cyb3rn0id's Avatar
    Join Date
    Mar 2018
    Location
    Italy
    Posts
    16
    Quote Originally Posted by Frank B View Post
    -
    might be your display, or a connection problem.
    The display-spi ist very fast, pls connect it directly to the board - no cables!
    I've connected directly to board. Maybe a display issue. I'll order some others displays.
    In the meanwhile I've tried connecting to IEC port some drives I have that works on a Commodore 64. A 1541 and a 1541-II. Don't works. After loading sometimes gives an out of data error, or garbage on the screen or nothing. The SD2IEC works even if a lot of games are not loaded.

  5. #205
    Junior Member Cyb3rn0id's Avatar
    Join Date
    Mar 2018
    Location
    Italy
    Posts
    16
    Quote Originally Posted by Frank B View Post
    I ordered 3.2'' SPI ILI9341 display in China, I am very curious if it works.
    Are the ones with the 40-pin connector?

  6. #206
    Junior Member
    Join Date
    Apr 2017
    Posts
    8
    can someone post a hex file for the vga version. I have assemble the board and would like to test it. TIA

  7. #207
    Junior Member
    Join Date
    Apr 2017
    Posts
    8
    Quote Originally Posted by ron2way View Post
    can someone post a hex file for the vga version. I have assemble the board and would like to test it. TIA
    Disregard the request for the hex file. I was able to get the board working.

  8. #208
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,060
    Quote Originally Posted by ron2way View Post
    Disregard the request for the hex file. I was able to get the board working.
    Good work!

  9. #209
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Quote Originally Posted by Cyb3rn0id View Post
    Are the ones with the 40-pin connector?
    This one:
    https://www.aliexpress.com/item/3-2-...859744548.html

  10. #210
    Junior Member
    Join Date
    Nov 2017
    Posts
    14
    I've made a 3d printed case for the Teensy64 and added a battery, usb charger, amplifier and speaker. It's basically a mobile c64 now, which explains the SX64-II on the case.

    I'm happy to add the STL / Fusion 360 files to the repo if wanted.

    Click image for larger version. 

Name:	IMG_20180503_183906.jpg 
Views:	209 
Size:	50.8 KB 
ID:	13729
    Click image for larger version. 

Name:	IMG_20180503_184019.jpg 
Views:	195 
Size:	50.8 KB 
ID:	13730

  11. #211
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    that looks great, would be nice to have a smaller one for portable handheld gaming (sorta like gameboy) hehe

  12. #212
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    @itec: Great ! Can you do a pullrequest?

  13. #213
    Junior Member
    Join Date
    Nov 2017
    Posts
    14
    @Frank B: Pullrequest completed.

  14. #214
    Junior Member
    Join Date
    Nov 2017
    Posts
    14
    @Frank B: I was wondering if you were doing any d64 work?. I have d64 image loading on my Teensy64 and the framework for a menu loader working. I haven't had time to do the writes yet. If your not tackling this, I will spend the time to finish it. The menu is native asm app that uses an invalid opcode (copied you) to call back to the teensy which then writes directly to video ram. Looks 100% native, but the heavy lifting is done in a higher level language on the teensy side.

  15. #215
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Quote Originally Posted by itec View Post
    @Frank B: I was wondering if you were doing any d64 work?. I have d64 image loading on my Teensy64 and the framework for a menu loader working. I haven't had time to do the writes yet. If your not tackling this, I will spend the time to finish it. The menu is native asm app that uses an invalid opcode (copied you) to call back to the teensy which then writes directly to video ram. Looks 100% native, but the heavy lifting is done in a higher level language on the teensy side.
    Oh, I kinda missed this post.
    No, I'm not working on D64. Would be good if you could contribute something for D64
    The invalid opcode-thing is not as good as it sounds, because it's not very compatible. But it's a start!

  16. #216
    Hi Frank,

    Congratulations for this fantastic MCU project. A nice example of collaboration between enthusiastic people!

    I would like to contribute as well if you don't have any objection.

    I have done few adaptations to the code to support new features:
    - A TFT On Screen Keyboard (touch screen interaction) with limited keys supported but also a PRG loader menu!
    - VGA output and TFT display simultaneously, using the TFT display as keyboard (the same image can boot in TFT mode only or in dual screen by pressing one of the custom keys)

    For the second feature I had to reshuffle the pins of the TFT display so, at same time, I added support for an analog joystick (replacing your JOY2), JOY1 remaining as is (VGA pinout) and I also added 5 custom keys.
    I have not tested but IEC, PS2 and USB should be working.

    I shared a small video:

    https://youtu.be/-psXHOKJ6W0

    About the code modifications, the dual screen mode is built as a diversity of the VGA variant.
    In settings :
    #define VGA 1
    #define VGATFT 1
    As indicated, this needs the pinout adaptation (see teensy64.h and the small txt file I added in the code)

    The on screen keyboard feature also work with your original TFT variant pinout.
    (VGA and VGATFT undefined in settings.h)
    It is a variant of the PS2 option (I reuse the key matrix of USB in keyboard.cpp, sorry for the confusion)
    #define PS2KEYBOARD 1
    #define OSDKEYBOARD 1

    Please tell me how to share the code!

    The biggest changes are in vic.cpp now split into vic8.cpp and vic16.cpp (VGA and TFT variants both present in same build) and of course teensy64.cpp. I also adapted the ILI9341 driver to support the touch screen and add some non DMA functions to draw.
    The rest is a new file for the OSD keyboard.

    I also added few functions to pause and resume the CPU core else non DMA functions for the TFT were too slow (non DMA access is required to handle the keyboard display, as the touch screen shares the same SPI bus.

    J-M
    Last edited by Jean-Marc; 06-04-2018 at 07:18 PM.

  17. #217
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,060
    That is a very impressive addition Jean-Marc!

    If you put your code on Github then Frank and others can look at it. If you start the repository with the Base code then update with your changes the 'diff' of the files will be easy to see.

  18. #218
    Hi,

    Frank has to grant me access to the GIT project first.
    I prepared everything already.

    my username "Jean-MarcHarvengt"

    J-M

  19. #219
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,060
    J-M doesn't show up a repository on github? … you can make your own fork/clone - or post the link if you have. Indeed making changes directly to Frank's repository would take permission - though you can make a PULL request with a clone.

  20. #220
    I cloned the project, created a new branch "vgatft_dual_screen_and_on_screen_keyboard_support ", added the files and commit them but when I "git push origin vgatft_dual_screen_and_on_screen_keyboard_support" , It tells "Permission to FrankBoesing/Teensy64.git denied to Jean-MarcHarvengt"

  21. #221
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,060
    Right - that is where Frank would have to allow you write access to the project. I see it as 'cloned' but can't see your repositories under Jean-MarcHarvengt.

    You could set up a PULL request with your changes though.

  22. #222
    Hi,

    I forked the project, now you can see the changes.
    (I hope it is ok for Frank)

    https://github.com/Jean-MarcHarvengt...aster/Teensy64

    You might have some compilations error in the keyboard_usb.cpp. I have not touched the file but I get an error in few println. Just comment them out...

    So if you compile as is, it should be compatible with the TFT pinout of Frank and you only have the On Screen Keyboard.
    If you edit settings.h, you can uncomment the "#define VGA" (still compatible with the VGA board but not add on) and "#define VGATFT" but then you need my pinout (dual screen with VGA and TFT)

    I forgot to mention that to have the VGA+TFT sharing the same buffer and working at same time, I had to reduce the DMA TFT buffer of few lines but not too much visible I think.
    Even if there is still RAM available, the UVGA driver seems to allocate extra memory even if the buffer is static.
    No idea why...
    I also hope the calibration of the touch screen is ok for you. Else you will have to adapt the function.

    Have fun, I hope you will appreciate that first version.

    J-M

  23. #223
    Cant believe what was posted in #210! Incredible! A C64 in a box. What a design. From my early years in 1982, I b uilt about 50 video games for the C64 including sound and graphics and all. What a great time that was. And It is so pretty to see that this Computer still is alive. I need more time to recover my games an port the to such a device.

  24. #224
    Junior Member
    Join Date
    Aug 2017
    Posts
    3
    I got time last night to assemble one of the two kits from @Defragster. And it's working great! Thanks @Frank B and @Defragster!

    I compiled with Arduino 1.8.5 and Teensyduino 1.42. I had to comment out the println statements that were noted above. I could not find what was supposed to signal RETURN in the serial monitor keyboard, so I added a line to treat ^ as RETURN. This is the change near the end of Teensy64.cpp in the yield() function:

    Code:
      //Input via terminal to keyboardbuffer (for BASIC only)
      if ( Serial.available() ) {
        uint8_t r = Serial.read();
    
       // added next line to change ^ to RETURN
        if (r == '^') r = 0x0d;
    
        sendKey(r);
        Serial.write(r);
      }
    Other than that, the emulator appears to be working well.

    Full sized USB keyboards work as long as there is enough power. I used a USB charger with 2.0A output but you can probably get away with less depending on the keyboard. Plugging the keyboard into a powered hub does not work. And I'm not surprised as many of the embedded USB controllers do not support hubs. Or if Teensy 3.5/3.6's hardware does, its possible hub support has not yet been written for it.

    And it works with a PI1541:
    Click image for larger version. 

Name:	IMG_20180707_111903_smaller.jpg 
Views:	58 
Size:	112.1 KB 
ID:	14152

    Now I'm tempted to try to port the PI1541 over to a Teensy 3.5 too...

  25. #225
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,060
    Good to hear the kits went together well!

    AFAIK - the USB Host code was ported when it had the needed features and customized to remove some conflicts. Not sure what they were, but on VGA alone from T_3.6 there were artifacts from USB operation.

    Current USB Host does support (many) Hubs on T_3.6 based on posts from KurtE/Paul.

    Very cool the 1541 'drive' works!

Posting Permissions

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