Search results

  1. M

    Teensy 4.1 + RA8875 DMA??

    Thanks, same. It's above my pay grade as well. I've never really had to dive deep into SPI. I've never had a case where there wasn't a library that didn't do what I needed with SPI/DMA! I suppose I could dig into to docs and see if I can figure it out.
  2. M

    Teensy 4.1 + RA8875 DMA??

    Thanks, but it looks like the same kind of DMA that the library provides. Apparently the controller can connect to some external flash/ROM and DMA from that, but since it's activating DMA built into the controller, it can't just pull data from the Teensy like this. But since there is SPI DMA...
  3. M

    Teensy 4.1 + RA8875 DMA??

    I'm trying to switch my current project to use a larger RA8875 LCD display. I need to use DMA mode, but it hasn't been working. After looking at the library code, I can see why: void RA8875::DMA_startAddress(unsigned long adrs) { _writeRegister(RA8875_SSAR0,adrs & 0xFF)...
  4. M

    [posted] Teensy 3.6 based 8086 PC emulator with CGA graphics, PS2 keyboard

    Let me clean a few bits up and put it somewhere. I'll just have it set to output to serial console for now so you don't have to mess with an LCD. You will need 16 MB of PSRAM on your Teensy though.
  5. M

    [posted] Teensy 3.6 based 8086 PC emulator with CGA graphics, PS2 keyboard

    Thanks! I'd say Linux runs like a slow 386 and DOS games run like a mid-tier or fast 386. The display performance has to be pretty slow, think 5 to 10 FPS. Otherwise the rendering will start eating away at the CPU performance too much since the Teensy's micro isn't a dual core. I wish it were...
  6. M

    ST7796 Teensyduino support

    The big-screen-t4 branch mostly works for me with the 4" ST7796! Async update wasn't working in the normal library, which is what I needed. However, it doesn't work if turning on continuous updates. Only one-shot. That's fine for me, but just FYI.
  7. M

    Display corruption problem with async update using ST7735_t3 library (using an ST7796 on a T4.1)

    I got this 4" 320x480 ST7796 LCD from Amazon. I'm trying to use it in my project, but whenever I try to use the async display mode to speed things up, the output is complete garbage. I'm initializing the tft with this: // For 3.5" or 4.0" TFT with ST7796 ST7796_t3 tft = ST7796_t3(TFT_CS...
  8. M

    [posted] Teensy 3.6 based 8086 PC emulator with CGA graphics, PS2 keyboard

    Thanks! I'm not sure how useful it will be to play 486-era games, but it's a fun experiment to see how far I can push the Teensy. An old Linux distro seems relatively usable on it if you are just doing console mode text stuff. Commands and basic applications work fast enough. 1.64 bogomips. :)...
  9. M

    [posted] Teensy 3.6 based 8086 PC emulator with CGA graphics, PS2 keyboard

    I am just now seeing this. Thanks for the post, Paul! I happen to currently be working on the "next generation" version of this with a Teensy 4.1. This one emulates a 486 PC. You need to install 16 MB of PSRAM on the board for this project and I highly recommend a heatsink and full 1 GHz...
  10. M

    Posix Thread

    Are you asking about alternative hardware to the Teensy? I wouldn't usually recommend threads on a microcontroller unless you're doing multicore stuff, there's almost always a better way to do it. I believe ESP32 supports pthreads out of the box if you insist though. I haven't tried it myself...
  11. M

    Posix Thread

    You will either need to reimplement POSIX threads yourself, or rewrite the program to not require them. You can probably create some sort of basic task scheduler that presents a (stripped down?) pthreads API using a timer interrupt, but I suspect it's going to be much easier to just rewrite the...
  12. M

    Power-saving on Teensy 4.1 project, disabling peripherals and other things

    A charging circuit had crossed my mind, along with adding a microUSB port to the back, but it will have to be rechargable AA batteries rather than an 18650. This was originally a cheap Chinese mini arcade machine from Amazon that I gutted, and I'm using the original 3xAA slots. Either way...
  13. M

    Teensy 4.1, Native Ethernet, MQTT and a 2 hour mystery

    I know, I meant I didn't notice that part in your OP. Anyway, I'm out of ideas -- I'll let someone else chime in!
  14. M

    Teensy 4.1, Native Ethernet, MQTT and a 2 hour mystery

    I'm sorry, I missed that part in the OP!
  15. M

    Teensy 4.1, Native Ethernet, MQTT and a 2 hour mystery

    Have you tried packet sniffing with Wireshark via a monitor port? Either with a basic hub or managed switch? This could provide some insight.
  16. M

    Power-saving on Teensy 4.1 project, disabling peripherals and other things

    I'm trying to find ways to save power on my T4.1 NES mini arcade. It's a heavy project to run on 3x AA batteries in series, and they will need to be replaced often or I need to use rechargables if I can't find some way to cut power usage significantly. There's a T4.1, TFT LCD, and an LM386 audio...
  17. M

    Hacking a cheap Chinese mini arcade machine with a Teensy 4.1

    Thanks! The smaller screen came in and now everything looks much nicer too. If anyone else is interested in trying this, I'd be happy to share my ugly NES emulator code for the Teensy, including interface code for this control pad. I'd like to throw support for reading arbitrary ROMs from SD...
  18. M

    Hacking a cheap Chinese mini arcade machine with a Teensy 4.1

    It came with a bunch of terrible no-name games, which I expected. I decided to turn it into a Mega Man 2 machine with my NES emulator and a Teensy instead! I'm waiting on a screen that will fit in there correctly, it should be here tomorrow. Interfacing the controls was incredibly easy, it was...
  19. M

    Full motion video + sound on the T4 + ILI9341. Eliminating tearing with ILI9341_t3n..

    This is seriously cool! Neat breadboard work, too. The physical slot would be a good addition, would make it feel a little more authentic. :) My GitHub username is mikechambers84. If you're interested, I have some PS/2 keyboard interface code that I used in my Teensy PC emulator. Though USB...
  20. M

    Full motion video + sound on the T4 + ILI9341. Eliminating tearing with ILI9341_t3n..

    My video files still need to be encoded into my custom format, but since it's utilizing JPEG encoding, they come out pretty small at least. Maybe making it able to support an already widely-used format would be better. Like MKV. I'm not sure how complicated that would be to implement, but then...
  21. M

    Full motion video + sound on the T4 + ILI9341. Eliminating tearing with ILI9341_t3n..

    That second link is the one I'm using. I've also tried a random Chinese 3.2" I got on Amazon and it works fine too. Any with the ILI9341 should theoretically work. Is your msx2 emulator posted anywhere? I'd be interested in seeing that, I love emulation. For the sound, I'm just using simple...
  22. M

    Full motion video + sound on the T4 + ILI9341. Eliminating tearing with ILI9341_t3n..

    Yeah, it's amazing what these modern micros can do. In the mid-late 90's this would have been considered powerful even for a desktop if it just had more RAM. My thought was it could be useful for someone who wants slick startup animations, or animations to play while the system is doing some...
  23. M

    Full motion video + sound on the T4 + ILI9341. Eliminating tearing with ILI9341_t3n..

    I'm working on a library that allows to you play full motion video with sound on a Teensy 4.x with an ILI9341. I'm not sure how useful such a library would be, but it seemed like a fun project to work on. It's essentially working. I'm using Kurt's awesome ILI9341_t3n library with DMA mode. I...
  24. M

    Got a Teensy 4.1, updated Teensyduino, old working code with ILI9341 DMA broken..

    Thanks, I am indeed already doing most of that. All constant arrays are in PROGMEM and I did put the framebuffer in DMAMEM. The rest of DMAMEM is used by a majority of the emulator RAM array. The PC emulator uses a split memory access scheme between that and a standard memory array to be able to...
  25. M

    Got a Teensy 4.1, updated Teensyduino, old working code with ILI9341 DMA broken..

    That's probably the best solution, you're right. It slipped my mind that we can do that now. :D
  26. M

    Got a Teensy 4.1, updated Teensyduino, old working code with ILI9341 DMA broken..

    Kurt, I'm having success with your t3n library! Thanks for making it. Though I was curious if it's possible to set the update area of the screen before each DMA transfer. That way I could allocate only 64 KB for a framebuffer and update each half of the screen separately at maybe 25 FPS. I...
  27. M

    Got a Teensy 4.1, updated Teensyduino, old working code with ILI9341 DMA broken..

    Thanks for the replies. Frank - It was working well on the 4.0 back in September. Though, I took the files from the MCUME project so it may have been modified from your version. Kurt - Thanks for having a look but based on what Frank said, I'll just try to adapt it to your ILI9341_t3n library...
  28. M

    Got a Teensy 4.1, updated Teensyduino, old working code with ILI9341 DMA broken..

    I have two programs which use code to write to an ILI9341 via DMA. These worked great on my Teensy 4.0 last year. I haven't touched them since. I updated Teensyduino to the latest version since I got a 4.1. This code no longer works. I can see via serial debug output that the code is running as...
  29. M

    A Teensy 4.0 demo. Playing the old Stunt Island DOS game. Real time 3D.

    I got the DMA code working well. The difference is noticeable. Especially during VGA palette fades. Very smooth! Thanks for the tip. I ended up settling on 25 FPS, otherwise the frequent 64 KB memory block copies in TFT_T_DMA::writeScreen started taking a slightly noticeable hit on emulator...
  30. M

    A Teensy 4.0 demo. Playing the old Stunt Island DOS game. Real time 3D.

    Thanks! I was not even aware that there was a DMA mode. I was using tft.DrawPixel. I knew there had to be a better way. 50 FPS sounds great to me! It takes about 200-300 ms (!!) to fill a 320x240 frame by drawing pixels individually.
  31. M

    A Teensy 4.0 demo. Playing the old Stunt Island DOS game. Real time 3D.

    Yes, it's actually a port of a Windows/Linux version I started writing from scratch back in 2011 called Fake86. I was very new to the C language then, and it shows. The code is very ugly! It is at least functional, though. You actually don't need to use SPI RAM on the T4 at all to get a full...
  32. M

    A Teensy 4.0 demo. Playing the old Stunt Island DOS game. Real time 3D.

    Jean-Marc, VERY nice project! I'll have to give yours a try and check out the various systems. It looks like you're actually using my own 8086 code in yours! :) It didn't run so well on the AVR, and I didn't expect it to, but it was fun/funny seeing an Arduino do that. The T3.6 with SPI RAM...
  33. M

    A Teensy 4.0 demo. Playing the old Stunt Island DOS game. Real time 3D.

    The Teensy 4.0 is a powerhouse, I'm impressed! Playing an old DOS game, emulated 8086 code on the T4.0 with real time 3D rendered gameplay. It handles it with no problem. I suspect it would be a lot smoother if the SPI LCD module wasn't such a bottleneck, but even still this is very playable. :D...
  34. M

    LCD screen stops functioning when also hooking up SCLK to Teensy SD adapter

    I'm just going to hook this up to some regular GPIO pins and do some bit-banging, I don't need huge amounts of bandwidth and I'm just trying to access the blocks raw. No file system needed. If anybody has any ideas regarding the issue with sharing the bus with the LCD, let me know though! That...
  35. M

    LCD screen stops functioning when also hooking up SCLK to Teensy SD adapter

    Sorry for the delay! I was at work all day. Messy-looking wiring, you say? Now that I can do! Here it is. :eek: https://i.imgur.com/szBhTg9.jpg Ground is taking a bit of a long path to the SD adapter, but I've tried directly connecting it with a single wire as well, did not make a difference...
  36. M

    LCD screen stops functioning when also hooking up SCLK to Teensy SD adapter

    Thanks for the link. I will incorporate these tips, however it causes the LCD to stop working even without connecting MOSI/MISO/CS to the SD board. All I have to do is connect SCLK alone, leave the rest unconnected and the LCD functionality breaks.
  37. M

    LCD screen stops functioning when also hooking up SCLK to Teensy SD adapter

    Getting the final feature of my project working on my new T4.0 involves hooking up the Teensy SD adapter to the breadboard. The LCD screen works fine until I connect the SCLK of the SD board. These are the only two SPI peripherals on the board. I don't even have to connect MOSI/MISO/CS. I'm not...
  38. M

    I can't seem to use all of the Teensy 4.0's memory?

    There's certainly no rush needed for making it faster. This thing is like lightning. Now that you say that, I realize I forgot to put a level shifter for the keyboard on my T3.6 version of this. I guess I was so used to working with AVRs that it didn't even cross my mind. It still works, but...
  39. M

    I can't seem to use all of the Teensy 4.0's memory?

    That's true. Unless it wants to allocate some memory there during runtime. Maybe Paul or someone else could chime in on whether we should be leaving a bit of free space in that segment. Or DOS and old PC games, which is really the point of this. It has code to connect with a PS/2 keyboard, I...
  40. M

    I can't seem to use all of the Teensy 4.0's memory?

    I basically just copied what KurtE was doing in his post. I put 512 KB in the DMAMEM area, and the other 128 KB in the regular global memory. uint8_t RAM0[524288] DMAMEM; uint8_t RAM1[131072]; And then just used both arrays normally, nothing special needs to be done to access the DMAMEM...
  41. M

    I can't seem to use all of the Teensy 4.0's memory?

    KurtE, this is exactly what I needed to know, thanks! The DMAMEM keyword allowed me to split this up into two arrays, and it compiled just fine. :)
  42. M

    I can't seem to use all of the Teensy 4.0's memory?

    Ah yes, the linker error I got was complaining that it was out of space in the DTCM region. So, I'll just need to figure out how to put some of it in the other 512 KB.
  43. M

    I can't seem to use all of the Teensy 4.0's memory?

    I considered that too after making this post, and tried even breaking it into ten 64 KB arrays and that wouldn't link, either. So you're probably right about there being some other syntax to use the TCM. Although the free memory report after compilation doesn't seem to differentiate the two...
  44. M

    I can't seem to use all of the Teensy 4.0's memory?

    I'm working on a project that requires a very large amount of RAM. I've tried allocating 640 KB in two different ways. I first tried to just declare a global array like so: uint8_t RAM[655360]; That won't link. So I attempted to see if I could malloc it: uint8_t *RAM; void setup() {...
  45. M

    Teensy 4.0 Release

    I just ordered my 4.0! I'm very excited. You can't beat this for price and performance. Your move, Arduino. I built an 80186 PC emulator with the 3.6, and what was holding back the performance was not the clock speed, but the fact that RAM was limited and I had to implement SPI SRAM access for...
  46. M

    [posted] Teensy 3.6 based 8086 PC emulator with CGA graphics, PS2 keyboard

    Am I correct in assuming that the FIFO can only be used on SPI0? I'll need to rewire the board slightly if that's the case. The RAM is on SPI1 right now, I'll need to share the LCD's bus with it.
  47. M

    [posted] Teensy 3.6 based 8086 PC emulator with CGA graphics, PS2 keyboard

    That 8 MB RAM chip looks great! I'll need to see if I can get one of those. I also didn't know about the FIFO capability, I'm going to have to see what kind of improvements can be had with that. It should be pretty substantial! :) When running entirely on the 3.6's native RAM, the emulator is...
  48. M

    [posted] Teensy 3.6 based 8086 PC emulator with CGA graphics, PS2 keyboard

    Thanks for the info, I wasn't aware of those options. I'll give them a try tonight and see how it goes. The emulator actually runs a bit faster than it shows in these videos, as tonight I realized I had it compiled with the "ADVANCED_CLIENT" define, which causes it to send all video memory...
  49. M

    [posted] Teensy 3.6 based 8086 PC emulator with CGA graphics, PS2 keyboard

    Hi all! This is something I did last year, but thought I'd finally share. I wrote a PC-based PC emulator some years ago, and later wanted to see how it worked on a microcontroller. So, I ripped the CPU core and a few other bits out, and got to work. I originally tried this with an Arduino...
Back
Top