Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: GB/GBC Emulator on Teensy4.1

  1. #1
    Junior Member
    Join Date
    Sep 2020
    Posts
    5

    GB/GBC Emulator on Teensy4.1

    Another Teensy emulator

    Ported from the highly accurate/compatible emulator SameBoy.

    It supports:

    USB Host Stack with input from Xbox360 Wired/Wireless Controllers
    ILI93412 TFT LCD Library by KurtE (Awesome library!)
    Audio ouput via MQS subsystem. GB Stereo audio is mixed into one channel.
    SD Card with FATFS
    Requires external PSRAM (8MB)

    Admittedly, due to the highly accurate emulation, performance is not quite perfect, but pretty good in some less demanding games!

    https://github.com/Ryzee119/SameBoyT4

    Click image for larger version. 

Name:	SameBoyT4.jpg 
Views:	16 
Size:	116.8 KB 
ID:	22108

    Click image for larger version. 

Name:	sameboy.jpg 
Views:	15 
Size:	91.1 KB 
ID:	22109

    Loving this teensy!

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,317
    Nice, Is the PSRAM access speed setup changed from 88 MHz to 132MHz? If that is a bottleneck it might be some easy help to performance.

    link here : Teensy-4-1-PSRAM-Random-Access-Latency

  3. #3
    Junior Member
    Join Date
    Sep 2020
    Posts
    5
    Thanks for the tip. I'll certainly have a look at that!

  4. #4
    Junior Member
    Join Date
    Sep 2020
    Posts
    5
    Quote Originally Posted by defragster View Post
    Nice, Is the PSRAM access speed setup changed from 88 MHz to 132MHz? If that is a bottleneck it might be some easy help to performance.

    link here : Teensy-4-1-PSRAM-Random-Access-Latency
    Thanks for that! I didn't notice a huge speed improvement by changing the psram clock.
    However it got me thinking about my other memory.
    The emulator core malloc'd ram and vram on the heap which I remembered is in the slower RAM region. I replaced these to use DTCM memory and got a small but notible improvement 😊

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,317
    Quote Originally Posted by Ryzee119 View Post
    Thanks for that! I didn't notice a huge speed improvement by changing the psram clock.
    However it got me thinking about my other memory.
    The emulator core malloc'd ram and vram on the heap which I remembered is in the slower RAM region. I replaced these to use DTCM memory and got a small but notible improvement ��
    Faster QSPI speed can't hurt when used (if chips likes it) ... indeed lower DTCM RAM runs at CPU speed, upper malloc/DMAMEM runs at CPU/4 so that can make a big difference when it doesn't run through the full speed 32KB cache.

    How much code is in ITCM? KurtE has a current Win imxrt-size.exe that shows in build - and there is a MEM func in the FrankB powerButton lib on github. Minding that 32KB block usage and moving code to FLASH resident could free up another 32KB of DTCM for use. Also the first 32KB of FLASH code should run from code cache at full speed.

Posting Permissions

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