Mini manual for configuring https://github.com/Stephane-D/sgdk on Windows with VSCode.

By ZaRR with HUGE help from Banshaku and Grind.
---Supposed to do step by step.

SGDK installed in C:/SGDK
 
code.visualstudio.com
View - Extensions CTRL+SHIFT+X:
C/C++ Language Basics
Genesis code
m68k

https://www.java.com (yes, it needed in newest SGDK versions, don't hesitate to get it)
On windows it should automatically set it's path var.

Now we need to do what's here written: https://github.com/Stephane-D/sgdk/wiki/SGDK-Installation
Let's do it:
Default Windows path var editor not cool, so we going to use this:
https://www.rapidee.com
Adding two VARIABLES(in left side of window, ALT+INS): 
GDK=C:/SGDK
GDK_WIN=C:\SGDK (the inverted / symbol is important here, atleast I think so)
And for default Windows PATH let's add a VALUE:
%GDK_WIN%\bin
CTRL+S to save changes. 

VSCode terminal(CTRL+`):
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
cd c:\SGDK\sample\cube_flat
%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen
(currently in this build of SGDK 1.51 (april 2020) when making changes in code or res, need to do
 %GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen clean one time, then again 
 %GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen
Should be fixed in next releases soon.

Add workspace folder
Explorer
Save Workspace (CTRL+S) in the project folder
Add this file to the project folder:
https://github.com/pleft/SEGA_VSCode_Template/blob/master/.vscode/c_cpp_properties.json



---
Other info can be found in https://github.com/Stephane-D/sgdk/wiki/ and c:\SGDK\doc\html\index.html

In termnial some useful cmds:
cd .. - returns back to one folder.
cls - clears screen.
UP arrow key on keyboard will show latest entered cmd.


Sound should be 8bit MONO.

Music:
XGM is a little packed VGM. It take less memory than VGM
https://deflemask.com the B effect can set a loop point
Ripping music from emuls won't add a loop, hex editing also didn't help. 
https://project2612.org has music from sega genesis games. VGZ are archives, extracted are .vgm

PNG:
Should be 8 or 4 bit. (the last one is easier to use but lower quality)

As for PNG...use GIMP -> if needed add alpha-channel on layer, then choose magic wand 
and remove what should be transparent 
 -> Image -> mode -> indexed -> 15 colours (NOT 16! 15!!!), CTRL+SHIFT+E (aka export as) and export with options:
Save colours values for transparenty, Automatic pixelformat and 0 compression.

https://allone-works.itch.io/palette-batch


To use without IDE under WIN, need to create GDK_WIN var with path of installed sgdk (c:\sgdk).
Then start cmd, open some project, example c:\sgdk\sample\cube_flat
To compile:
%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen -B
(-B is for rewriting always all files, sometimes some files stuck at their previous state)

IURI method:
%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen debug
START ..\..\Programs\Gens\gens.exe %cd%\out\rom.bin

It's a bat inside the project folder that after it compiles the game, then it runs an emulator with the game loaded in it.

Stef recommends to make bat file:
SET PATH=c:\sgdk\bin
%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen

!!!!!!!!!!!!!!!!!
IF NOTHING HELPS, MAKE BAT FILE IN PROJECT FOLDER AND URN IT!!!!! RUN!!!!!!!!!!!!!! AAAAAAAAAAA!!!!!!!!!!!!! (for me help)





