Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running in flash #21

Closed
fruit-bat opened this issue Oct 1, 2021 · 3 comments
Closed

Running in flash #21

fruit-bat opened this issue Oct 1, 2021 · 3 comments

Comments

@fruit-bat
Copy link

Ok, so this isn't really an issue, but I was hoping for some advice (please!).

I've been having lots of fun with this library and have had a go at writing a tmds encoder for a 48k ZX Spectrum. My first attempt at arm assembly, which I'm sure is pretty terrible, but it seems to work fine.

Given that worked, I thought I would try a 128k spectrum but there is not enough RAM with 'copy to ram' set... So I switched it off, and amazingly almost everything keeps working from flash.

But now, when I try to read from the SD card it now stalls the video output, which is visually apparent as white lines on the screen , often followed by the colour channels ending up out of sync.

I figured that I 'just' needed to move some functions to RAM, in particular the isr routines for the SD card. After many random attempts all which had no effect, I thought I would seek some advice.

As some context, the SD card uses dma_irq_0 and a couple of dma channels along with an spi interface. I've set the dvi encoder to use dma_irq_1. I don't think the encoder is under-running as changing the number of buffers makes no difference (although this is a guess).

Any thoughts appreciated, even if it's give up!

@fruit-bat
Copy link
Author

Ok, got this working. Probably doesn't need any changes to PicoDvi. I'll comment again when I've wound back to a minimum set of changes.

@fruit-bat
Copy link
Author

Looks like I only need the changes to the SD card SPI library, so feel free to close this one. Thanks for leaving this open while I investigated.

@Wren6991
Copy link
Owner

Wren6991 commented Nov 5, 2021

Thanks for looking at that. Colour channels getting out of sync sounds like a DMA throughput issue, which might happen if you inadvertently DMA from XIP, causing DMA to stall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants