import sys
import os
NOP = 0x90
offsets_and_values = {
0x00030170: 0x00,
0x000A94D0: NOP, 0x000A94D1: NOP, 0x000A94D2: NOP, 0x000A94D3: NOP, 0x000A94D4: NOP, 0x000A94D5: NOP, 0x000A94D6: NOP, 0x000A94D7: NOP, 0x000A94D8: NOP, 0x000A94D9: NOP, 0x000A94DA: NOP, 0x000A94DB: NOP, 0x000A94DC: NOP, 0x000A94DD: NOP, 0x000A94DE: NOP, 0x000A94DF: NOP, 0x000A94E0: NOP, 0x000A94E1: NOP, 0x000A94E2: NOP, 0x000A94E3: NOP, 0x000A94E4: NOP, 0x000A94E5: NOP, 0x000A94E6: NOP, 0x000A94E7: NOP, 0x000A94E8: NOP, 0x000A94E9: NOP, 0x000A94EA: NOP, 0x000A94EB: NOP, 0x000A94EC: NOP, 0x000A94ED: NOP, 0x000A94EE: NOP, 0x000A94EF: NOP, 0x000A94F0: NOP, 0x000A94F1: NOP, 0x000A94F2: NOP, 0x000A94F3: NOP, 0x000A94F4: NOP, 0x000A94F5: NOP, 0x000A94F6: NOP, 0x000A94F7: NOP, 0x000A94F8: NOP, 0x000A94F9: NOP, 0x000A94FA: NOP, 0x000A94FB: NOP, 0x000A94FC: NOP, 0x000A94FD: NOP, 0x000A94FE: NOP, 0x000A94FF: NOP, 0x000A9500: NOP, 0x000A9501: NOP, 0x000A9502: NOP, 0x000A9503: NOP, 0x000A9504: NOP, 0x000A9505: NOP, 0x000A9506: NOThis downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.
Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK from newest Visual Studio.
You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.
To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.
To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).
I've been following GamingMonsters's gbdk Gameboy Dev tutorial (it's rad! https://www.youtube.com/playlist?list=PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo).
Was doing this for my own reference, but thought I may as well flesh out & share I'm on MacOS, so have put together anywhere I've had to do something different, I'm up to Session 10, so will update if anything further comes along as we progress.
Quick heads up, before you run anything here make sure you know what it's doing, this all worked fine and dandy for me, but I'm not making any promises!
| #!/usr/local/bin/python3 | |
| # Copyright (c) 2019 University of Utah Student Computing Labs. ################ | |
| # All Rights Reserved. | |
| # | |
| # Permission to use, copy, modify, and distribute this software and | |
| # its documentation for any purpose and without fee is hereby granted, | |
| # provided that the above copyright notice appears in all copies and | |
| # that both that copyright notice and this permission notice appear | |
| # in supporting documentation, and that the name of The University |
Do you need a refresher on git? Go through Codecademy's git course.
-
Using your terminal/command line, get inside the folder where your project files are kept:
cd /path/to/my/codebase. → You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
→ Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here. -
Check if git is already initialized:
git status
| ISC License | |
| Copyright (c) 2016, Job Vranish | |
| Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. | |
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| ################################################################################ | |
| # Prevent OSX calling home # | |
| # # | |
| # Mix of different /etc/hosts files found over internet, and calls filtered # | |
| # using LittleSnitch for months. # | |
| # # | |
| # OSX sends a huge amount of requests to Cuppertino, even when you don't use # | |
| # Spotlight suggestions, iCloud, updates and other services. Even if they are # | |
| # disabled. # | |
| # # |
| use std::fmt; | |
| #[derive(Copy,Clone)] | |
| enum CellState { Dead, Alive } | |
| impl fmt::Display for CellState { | |
| fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | |
| let printable = match *self { | |
| CellState::Alive => 'x', | |
| CellState::Dead => ' ', |
| tell application "Mail" | |
| set theSubject to "Subject" -- the subject | |
| set theContent to "Content" -- the content | |
| set theAddress to "xxx@163.com" -- the receiver | |
| set theSignatureName to "signature_name"-- the signature name | |
| set theAttachmentFile to "Macintosh HD:Users:moligaloo:Downloads:attachment.pdf" -- the attachment path | |
| set msg to make new outgoing message with properties {subject: theSubject, content: theContent, visible:true} |