Operation Bit pattern A1 A2 A3
btst dn,dm %0000'nnn1'0000'0mmm BTSR1
btst dn,am %0000'nnn1'0000'1mmm MPIW1
btst dn,(am) %0000'nnn1'0001'0mmm ADRW1 BTSM1
btst dn,(am)+ %0000'nnn1'0001'1mmm PINW1 BTSM1
btst dn,-(am) %0000'nnn1'0010'0mmm PDCW1 BTSM1
btst dn,d16(am) %0000'nnn1'0010'1mmm ADSW1 BTSM1
btst dn,d8(am,Xl) %0000'nnn1'0011'0mmm AIXW0 BTSM1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dmaSource function addr,((addr>>1)&$7FFFFF) | |
dmaLength function length,((length>>1)&$7FFF) | |
dmaCommLength function length,(($9400|((length&$FF00)>>8))<<16)|($9300|(length&$FF)) | |
dmaCommSrcLow function source,(($9600|((source&$FF00)>>8))<<16)|($9500|(source&$FF)) | |
dmaCommSrcHigh function source,$9700|(((source&$FF0000)>>16)&$7F) | |
; Tells the VDP to copy a region of 68k memory to VRAM or CRAM or VSRAM. | |
dma68kToVDP macro src,dest,length,type,bswap | |
if MOMPASS>1 | |
if ((src)&1)<>0 |
Sources to go through:
- asp68k peephole optimizations: Not all are real.
- Efficient 68000 Progamming: Probably some overlap with the above.
- 68000 Tricks and Traps
- A couple 68k tricks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Godbolt: https://godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAM1QDsCBlZAQwBtMQBGAJlICsupVs1qhkAUm4AhSVNIBnTO2QE8dSplroAwqlYBXALa1Bm9ABk8tTADkjAI0zEuAFgBsvAA6p5hNbV0DY0FvX1U6S2s7Q0dnTndeRWVw2gYCZmICQKMTTgUlTBV/NIyCSNsHJ0F5dMzs4Lya0vLo2K4ASgVUfWJkDgByAHoAKgBqAFph8dGAWQwOUe1ZZYBmKVGrLHpx9Pt5ccN5kFGCcTXR5HH7Zl9L1CoqRQJjlzP13fGAdzx0AiRRlwTKajYaDcQABgAgiMIZCQYtUJ4AJ7EPDABAEUYQbTtUYAMWEhkw31Eo244M4nHG5M4AA5RmdtFRCcSrMAAHTyOh4ZAAAWAhmYeFY7LQhjO2FhIKlYwAKgg8PJRp5iKhgMRmIYNkqqMRMJhRlyqARPhkFkjuhcRKM9fgaqj7PoCAbCKMROhBiRRod8FQkRtTlD4fotE4TggDc7iIYlfdwwaAOI2ACqo3MmHkimIowTmicbFGAAV9PZWDy0zzNIo3UrPCWy/II%2BgZaN7P6/ga8XqDQx7iazfjulpmClSKNMIQI9mAG5OXx0UYrUZxjsVvq0RRjkgtiAj0YWnrLzwpXEif3CKOjWfEee0dkylvyxXK1XqzXa0Z2ggOp2YdAbWh41GBBEUjBA91db5WFYVsDX0RQqH0Vgx0dQM4TGAB1ABJWUAAkAHlk1lUZIRsABNUYMMhAAlajSNlMi3lGb4/m6TFMFnQDVzwQxPDLP9mIyDV6H9e4WxmbBqO0XD6MhKQsPMHCKK9PEcJsbAGAYfF8Ookiixo2UsO0ZNzBootk2owt8IYbB7yDMYGH1ICk1TdNMzDXNrA1GDi1LctLHXasaGzQ49U/TB0mFeQ7PQlsyMtRtulYf9wNnG1CgnWd/2YC5EVEqhnJTNMMyzHM828ot638ysN0wFs2DoY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*- Mode: C++; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ | |
/* | |
* Copyright (C) Flamewing 2018 <[email protected]> | |
* | |
* This program is free software: you can redistribute it and/or modify it | |
* under the terms of the GNU Lesser General Public License as published | |
* by the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, but |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Language: Cpp | |
BasedOnStyle: LLVM | |
AccessModifierOffset: -4 | |
AlignAfterOpenBracket: AlwaysBreak | |
AlignConsecutiveAssignments: true | |
AlignConsecutiveDeclarations: true | |
AlwaysBreakTemplateDeclarations: Yes | |
IndentPPDirectives: AfterHash | |
IndentWidth: 4 | |
KeepEmptyLinesAtTheStartOfBlocks: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Checks: '-*,bugprone-*,cert-dcl21-cpp,cert-dcl50-cpp,cert-env33-c,cert-err34-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,cert-msc50-cpp,cert-msc51-cpp,cppcoreguidelines-*,-cppcoreguidelines-macro-usage,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-vararg,google-build-using-namespace,google-explicit-constructor,google-global-names-in-headers,google-readability-casting,google-runtime-int,google-runtime-operator,hicpp-*,-hicpp-vararg,misc-*,modernize-*,performance-*,readability-*,-readability-named-parameter' | |
CheckOptions: | |
- key: bugprone-argument-comment.StrictMode | |
value: 1 | |
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow | |
value: WinMain,SDL_main | |
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic | |
value: 1 | |
FormatStyle: 'file' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
-- This file is part of the Lua HUD for TASing Sega Genesis Sonic games. | |
-- | |
-- This program is free software: you can redistribute it and/or modify | |
-- it under the terms of the GNU Lesser General Public License as | |
-- published by the Free Software Foundation, either version 3 of the | |
-- License, or (at your option) any later version. | |
-- | |
-- This program is distributed in the hope that it will be useful, | |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
To use msys2 bash on VSCode, add the following to settings:
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": [
"--login",
],
"terminal.integrated.env.windows": {
"CHERE_INVOKING": "1",
"MSYSTEM": "MINGW64",
OlderNewer