Compilation of this example:
gcc -c -D NAMESPACE=First_ first.c -o First_first.o
gcc -c -D NAMESPACE=Second_ second.c -o Second_second.o
gcc -c -D NAMESPACE=Third_ third.c -o Third_third.o
gcc -c -D NAMESPACE=Fourth_ fourth.c -o Fourth_fourth.o| ****************************************** | |
| *SEGA Megadrive comunication program * | |
| *(c) 1991 Synchron Assembly * | |
| *https://www.tn-data.se * | |
| ****************************************** | |
| *f1=trace, f2=skip instruction f4=go | |
| *d xxxx set dissasm window, d pc | |
| *m xxxx set memory window, m pc | |
| *j xxxx set sega PC |
| //Created by DhilipSiva | |
| //Free to modify and use | |
| main() | |
| { | |
| char far *videoMemory = 0xB8000000; | |
| char *helloString = "Hello World"; | |
| int stringLength = 11; //length of "Hello World" is 11 | |
| int count; | |
| for(count = 0; count < stringLength; count++) |
| $ ldd GrimFandango | |
| linux-gate.so.1 (0xf7778000) | |
| libLua.so => ./libLua.so (0xf7749000) | |
| libchore.so => ./libchore.so (0xf773f000) | |
| libSDL2-2.0.so.1 => ./libSDL2-2.0.so.1 (0xf7621000) | |
| libpthread.so.0 => /lib32/libpthread.so.0 (0xf75e8000) | |
| libGL.so.1 => not found | |
| libGLU.so.1 => not found | |
| libX11.so.6 => not found | |
| libstdc++.so.6 => not found |
| ;=============================================================================== | |
| ; Multiplication | |
| ;=============================================================================== | |
| ; Although the SNES has a hardware multiplier, multiplication by small | |
| ; constants can be implemented faster using the shift-and-add method. | |
| ;------------------------------------------------------------------------------- | |
| ;=============================================================================== | |
| ; MUL3 2Val+Val | |
| ;=============================================================================== |
| YOUR APP: | |
| - Make sure in App Properties, “Min version” must be Fall Creators Edition (16.....) | |
| - In Package.appxmanifest, change the Entry point to <NAMESPACE>.<MAINCLASS>, not the XAML stuff. | |
| - In fact you should get rid of all XAML Files. | |
| FNALIBS: | |
| For all dependencies: | |
| - Compile in 64-bit Release mode. | |
| - Retarget to latest build versions if necessary, but try to keep Min Windows SDK to Fall Creators Edition. | |
| - If any project asks you to retarget, right click the SOLUTION (not the project) and click Retarget Solution. |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| // Reg defines, to extract to some header | |
| #define REG_VRAMADDR (*((volatile uint16_t *)0x3c0000)) | |
| #define REG_VRAMDATA (*((volatile uint16_t *)0x3c0002)) | |
| #define REG_VRAMINC (*((volatile uint16_t *)0x3c0004)) | |
| #define REG_LSPCMODE (*((volatile uint16_t *)0x3c0006)) |
The Mega EverDrive PRO has a USB port (much like the EverDrive X7) which allows you to send arbitary data to the Mega Drive over USB. With the X7 you could simply send data to the USB serial device and pick it up at a specific memory mapped location on the Mega Drive. With the PRO, however, you need to wrap the data in a "command" and send it over the USB serial device, so that it will be available to the Mega Drive.
The following information was obtained by reading the source contained in the MEGA-PRO repo.
| Field | Bytes | Value (hex) | Description |
| // no, this is not that useful | |
| package main | |
| import ( | |
| "fmt" | |
| "unsafe" | |
| ) | |
| type Kind[T any] struct{} |