talofer99 / AZIP_ESP32

10 stars 1 forks source link

[Info] "backported" AZIP_ESP32 to the TTGO VGA32 v1.4 (like FabGL Hardware) #1

Open guidol70 opened 3 years ago

guidol70 commented 3 years ago

Because you changed the GPIO Pins for VGA and the Init of the SDCard I "backported" your sketch to the TTGO VGA32 v1.4 which Iam using with my RunCPM and also FabGL ;) RunCPM on the TTGO VGA32 can run the "real" ZORK1.COM from inside CP/M...

It only worked for me when adding/including the SPI.h and using SPI.begin before sd.begin (do we need to include SD.h in fileio.cpp when using the lowercase sd. and not SD.begin ?)

Because I hadnt such a small card with this combination the .DAT is loaded from a 16GB FAT32 card.

PS: How about a "reset" when you leave the adventure with Quit and (Y)es? because then the system seem to hang...

AZIP_TTGO_VGA32

AZIP_VGA32_ESP32_24042021.zip

talofer99 commented 3 years ago

Very cool, I ordered one my self :) The sd in files is needed since the major work of read/write and it wont compile without it. I never got to the quit part and its a great idea. I was originally thinking of adding it when hitting escape.

I was thinking of moving the SD my self to allow the original pinout (fabgl) .... I will try to find the time in the next week to try it out, if not I will wait for the board I ordered to arrive and try it then. If it all work I will upload the fixed code :)

Thanks for the great input :)

guidol70 commented 3 years ago

The sd in files is needed since the major work of read/write and it wont compile without it.

For me it did compile without the inculde of SD.h in fileio.cpp - therefore I did ask :) but I didnt play the adventure - so maybe it will hang without it later :(

Did you try a FAT32 formatted Card with 8.3-filenames, because it did work here....

talofer99 commented 3 years ago

mine was formatted with FAT not fat32 I had endless issues with the SD until I got it to work well. I will try to at least for now incorporate the SD change and see how it works. will keep you posted.

talofer99 commented 3 years ago

@guidol70 thanks again for the updates. I added the SPI and SD init from your great code, also thanks for that little touch on setting things in place so all the [OK] line up :) I left both my display begin - with the one you use comment out

// display (R, G, B, H and V) displayController.begin(GPIO_NUM_21, GPIO_NUM_22, GPIO_NUM_4, GPIO_NUM_17, GPIO_NUM_15); // un comment this and comment the above to use the TTGO VGA32 settings. //displayController.begin(); displayController.setResolution(VGA_640x480_60Hz);

And for now as a quick sulition when you quit the board will restart with this add on

void loop() { // put your main code here, to run repeatedly: interpret( ); // if we got to here the system was halted by Quit - we restart to allow choosing of new game. ESP.restart(); }

Again thanks for the help, I order a board, so once I get it I already got thigs setup :) If you have other ideas would love to add stuff to it like save/load.

guidol70 commented 3 years ago

@talofer99 The "great code" for SPI & SD-init is from the original RunCPM-project. I used it in my fork for the TTGO VGA32 ;) In the original RunCPM-code the Pinouts are in a seperate HW-File for the corredponding board (there are others than the ESP32 for RunCPM)

I will test the restart-code in the void loop tomorror :)

talofer99 commented 3 years ago

cool, let me know.

guidol70 commented 3 years ago

The void loop did work this way as a restart :) (I think you tested this already before)

talofer99 commented 3 years ago

yes I did So I'm closing down this issue .. unless there is something else I did not addressed?