fbergama / pigfx

PiGFX is a bare metal kernel for the Raspberry Pi that implements a basic ANSI terminal emulator with the additional support of some primitive graphics functions.
MIT License
275 stars 60 forks source link

Added a few things to PiGfx #11

Closed bkg2018 closed 5 years ago

bkg2018 commented 5 years ago

Hello I added other fonts, display mode change, XOR and transparent drawing for fonts and sprites, tabulation width setting to PiGfx and ESC sequences for accessing them from a RC2014 (or any computer for that matter). I'd be happy to discuss with you about this!

fbergama commented 5 years ago

Hello, thanks for your interest in this project. Unfortunately, I've no time to properly support it anymore. If you are confident about your modifications I'll just merge your PR without testing it myself.

bkg2018 commented 5 years ago

Hello Filippo,

Thank you for your reply. I understand you can’t support it anymore, free-time is a precious ressource. Too bad, I find PiGfx is a nice piece of software.

I think my modifications are ok - ostly impacting character display for now - but I’ll run serious testing first and let you know next week when I think it’s ok. I’m a little overbusy on RC2014 related projects right now :-)

I think I could take the relay on PiGFX, making it evolve and support it. Probably I wouldn’t touch USPI, DMA or Serial related stuff, at least not yet. There’s no hurry and in fact I don’t really know how such a relay can be done in Git.

I’d like to know where you found the informations for the Pi Zero low level programming: DMA channels etc. It could help me to insure support and evolution of PiGFX.

Best regards!

Francis

Le 27 nov. 2018 à 09:51, Filippo Bergamasco notifications@github.com a écrit :

Hello, thanks for your interest in this project. Unfortunately, I've no time to properly support it anymore. If you are confident about your modifications I'll just merge your PR without testing it myself.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/pull/11#issuecomment-441976389, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGiQVqWtllTfR2-1RoTLhIsqxKdg-Tqks5uzP0LgaJpZM4YwvR3.

fbergama commented 5 years ago

Ok, so I'll wait for your testing before merging your modifications.

I'll be happy to give you the permission to commit in this repo if you think you can (at least partially) support this project. As I said I'm quite sad about not being able to dedicate some time to it anymore.

Regarding the information on how to low-level program the Pi Zero, I've learned mostly from the very good dwelch67 repo (https://github.com/dwelch67/raspberrypi) and from the official BCM2835 datasheet. I also really suggest you buy a JTAG dongle to debug your code directly on the device... emulators (like qEmu) may behave a little differently than the real Pi.

Filippo

bkg2018 commented 5 years ago

Hello Filippo,

I’m a little busy with Xmas approaching but I checked my modifications (sequences etc), fixed a few minor bugs, added a little docs. I think my mods are ok but after last week-end I isolated the RC2014 specific stuff in ifdefs (startup logo) and still have to check that.

I think it could be pushed like it is but maybe wait until Saturday so I check my binary is ok like this.

I managed to get Eclipse build PIGFX with the arm-none toolchain but despite a lot of tries, I couldn’t get qemu to work: it keeps saying 'qemu-system-arm: -kernel pigfx.elf: unsupported machine type Use -machine help to list supported machine’. My command line is : 'qemu-system-arm -kernel pigfx.elf -cpu arm1176 -m 4096 -M raspi -no-reboot -serial stdio -append “”'

About JTAG I don’t know yet what this is. To test my mods, I build PIGFX binary, switch off the RC2014, unplug the PiZeroTerminal SD, put it into my mac external SD reader, copy kernel.img on it, plug the SD back into PZT, switch on te RC2014, then enjoy or despair.

Thanks for the Pi Zero links.

Le 2 déc. 2018 à 23:03, Filippo Bergamasco notifications@github.com a écrit :

Ok, so I'll wait for your testing before merging your modifications.

I'll be happy to give you the permission to commit in this repo if you think you can (at least partially) support this project. As I said I'm quite sad about not being able to dedicate some time to it anymore.

Regarding the information on how to low-level program the Pi Zero, I've learned mostly from the very good dwelch67 repo (https://github.com/dwelch67/raspberrypi https://github.com/dwelch67/raspberrypi) and from the official BCM2835 datasheet. I also really suggest you buy a JTAG dongle to debug your code directly on the device... emulators (like qEmu) may behave a little differently than the real Pi.

Filippo

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/pull/11#issuecomment-443546428, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGiQakVNgVgpXMCHqe8ksKXGkv6lJ2Bks5u1E4fgaJpZM4YwvR3.

fbergama commented 5 years ago

Hi Francis, I'm glad that you are actively working to provide high-quality changes to the project. Don't worry, just take your time and tell me when you are ready.

Back at the time, I used a specific fork of qEmu with all the modification needed to support the raspberry pi. It looks that now all those mods are included in the main branch, so probably you'll just need to clone and compile the latest version of qEmu to let it work.

JTAG is a sort of industry standard to support hardware debugging. Basically, you connect a special dongle to the raspi and you can do all the sort of neat features like stepping through code, change the memory content, etc. It's the only way to go if you have problems debugging interrupts, peripherals etc.

I'm looking forward to receiving your changes! Best, Filippo

bkg2018 commented 5 years ago

Hello Filippo,

Ready! I pushed the last changes on my fork.

I will probably add a few things to the startup so it shows what happens with transparency and XOR modes, but probably I will add graphic features first.

I’m working on a big project on macOS parallel to this, also want to add a few instructions to the nascom BASIC to have easier control of PiGfx, and as for everybody there’s also real-life, work and family so I don’t expect my next additions to pigfx to happen before two or three months, unless I add little things here or there which do not have a big impact and don’t take me too far from my big macos project.

I didn’t changed anything regarding licenses and your name in copyright etc.

Le 13 déc. 2018 à 11:17, Filippo Bergamasco notifications@github.com a écrit :

Hi Francis, I'm glad that you are actively working to provide high-quality changes to the project. Don't worry, just take your time and tell me when you are ready.

Back at the time, I used a specific fork of qEmu with all the modification needed to support the raspberry pi. It looks that now all those mods are included in the main branch, so probably you'll just need to clone and compile the latest version of qEmu to let it work.

JTAG is a sort of industry standard to support hardware debugging. Basically, you connect a special dongle to the raspi and you can do all the sort of neat features like stepping through code, change the memory content, etc. It's the only way to go if you have problems debugging interrupts, peripherals etc.

I'm looking forward to receiving your changes! Best, Filippo

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/pull/11#issuecomment-446915454, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGiQU7IGApWQNkiXnzRPZS2ud61YqGfks5u4ilRgaJpZM4YwvR3.

fbergama commented 5 years ago

Merged :)

bkg2018 commented 5 years ago

Hello Filippo,

I’ve put a pull request for a minor update in PiGfx about terminal coordinates.

To ease things, would you make me contributor to the Git and allow push by contributors, so I can push things directly for later updates?

Apart from this … I wish a nice 2019 to you!

Francis

fbergama commented 5 years ago

... done! You are a contributor now Thank you again for the patches and nice 2019

Filippo

bkg2018 commented 5 years ago

Thank you :-)

Le 21 janv. 2019 à 09:47, Filippo Bergamasco notifications@github.com a écrit :

... done! You are a contributor now Thank you again for the patches and nice 2019

Filippo

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/pull/11#issuecomment-455992195, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGiQWM9ae1sLIqxBA7gK9UtP59mmGIDks5vFX6bgaJpZM4YwvR3.

bkg2018 commented 5 years ago

Hello again Filippo, I have one not-urgent-at-all question.

I see there is an origin/hexloader branch in Git, dated february 2017, which has not been merged. It seems to include an hexloader and buffered UART improvements.

Is it stable/reliable? I could probably find a little time to check and merge this, if you think this is worth it and can tell me what to check :-)

Francis

fbergama commented 5 years ago

Hi Francis, Yes, it was an attempt (quite working but never finished) to write a hex loader for RC2014. It was on a separate branch since it works only for that computer. The idea was roughly the following:

This way you can simply run any Z80 code without any external programmer. If you want you can try to test it and finish it properly. I don't know if it's still interesting for the RC2014 community

Filippo

bkg2018 commented 4 years ago

Hello Filippo,

Trying to be back on work on PiGfx (for the SC126), I wanted to load fonts from file and realized that nether fopen() nor open() are available, because pigfx is built with -nostdlib.

I guess this is because you have your own startup code (asm.s which jumps to void entry_point() in pigx.c).

Do you remember how you thought you’d support file loading ?

There must be a file support already from start.elf, as it loads the kernel.img file but I don’t know much more than this.

Best regards Francis

fbergama commented 4 years ago

More or less I remember... Back in the days, I used libfs from https://github.com/jncronin/rpi-boot to read files from the SD card. Sorry I cannot help you more than this. Just browse the code of the hexloader branch

Filippo

bkg2018 commented 4 years ago

Thank you, I’ll check this and see what I can do with it :-)

Le 7 oct. 2019 à 18:06, Filippo Bergamasco notifications@github.com a écrit :

More or less I remember... Back in the days, I used libfs from https://github.com/jncronin/rpi-boot https://github.com/jncronin/rpi-boot to read files from the SD card. Sorry I cannot help you more than this. Just browse the code of the hexloader branch

Filippo

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/pull/11?email_source=notifications&email_token=ABA2EQJR37CY4S7DM5QHQ3TQNNNBPA5CNFSM4GGC6R32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAQ477Y#issuecomment-539086847, or mute the thread https://github.com/notifications/unsubscribe-auth/ABA2EQIXAZE6JVKZDANPMC3QNNNBPANCNFSM4GGC6R3Q.