diff options
-rw-r--r-- | INSTALL.md | 2 | ||||
-rw-r--r-- | constants/wram_constants.asm | 2 | ||||
-rw-r--r-- | data/default_options.asm | 2 | ||||
-rw-r--r-- | docs/bugs_and_glitches.md | 5 | ||||
-rw-r--r-- | engine/menus/options_menu.asm | 4 | ||||
-rw-r--r-- | engine/overworld/events.asm | 4 | ||||
-rw-r--r-- | engine/printer/printer.asm | 32 | ||||
-rw-r--r-- | engine/printer/printer_serial.asm | 10 | ||||
-rw-r--r-- | wram.asm | 7 |
9 files changed, 35 insertions, 33 deletions
diff --git a/INSTALL.md b/INSTALL.md index 0286f9ee5..a5a46eb66 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -34,7 +34,7 @@ Run setup and leave the default settings. At the "**Select Packages**" step, cho - `git` - `gcc-core` -Click once on the text that says "**Skip**" next to each package to select the most recent version to install. +Double click on the text that says "**Skip**" next to each package to select the most recent version to install. Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.zip** or **win32.zip** release. Extract it and put all the `exe` and `dll` files individually in **C:\cygwin64\usr\local\bin**. diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm index 08cb2092b..4a2c796a7 100644 --- a/constants/wram_constants.asm +++ b/constants/wram_constants.asm @@ -54,7 +54,7 @@ NUM_FRAMES EQU const_value const FAST_TEXT_DELAY_F ; 0 const NO_TEXT_DELAY_F ; 1 -; wGBPrinter:: ; cfd0 +; wGBPrinterBrightness:: ; cfd0 GBPRINTER_LIGHTEST EQU $00 GBPRINTER_LIGHTER EQU $20 GBPRINTER_NORMAL EQU $40 diff --git a/data/default_options.asm b/data/default_options.asm index c09b18060..00fcfa10e 100644 --- a/data/default_options.asm +++ b/data/default_options.asm @@ -7,7 +7,7 @@ DefaultOptions: db FRAME_1 ; wTextboxFlags: use text speed db 1 << FAST_TEXT_DELAY_F -; wGBPrinter: normal brightness +; wGBPrinterBrightness: normal db GBPRINTER_NORMAL ; wOptions2: menu account on db 1 << MENU_ACCOUNT diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index a3a137dfb..c9437b3e1 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -1711,6 +1711,7 @@ This supports up to six entries. call ValidateTempWildMonSpecies jr c, .nowildbattle +- ld a, b ; This is in the wrong place. cp UNOWN jr nz, .done ``` @@ -1726,7 +1727,7 @@ This supports up to six entries. ld de, 3 ld hl, .pointers call IsInArray - jr nc, .nope_bugged + jr nc, .nope pop bc inc hl @@ -1735,7 +1736,7 @@ This supports up to six entries. ld l, a jp hl - .nope_bugged + .nope - ; pop bc + pop bc xor a diff --git a/engine/menus/options_menu.asm b/engine/menus/options_menu.asm index a776a05c1..d1aa563f6 100644 --- a/engine/menus/options_menu.asm +++ b/engine/menus/options_menu.asm @@ -343,7 +343,7 @@ Options_Print: .Save: ld b, a - ld [wGBPrinter], a + ld [wGBPrinterBrightness], a .NonePressed: ld b, $0 @@ -375,7 +375,7 @@ Options_Print: GetPrinterSetting: ; converts GBPRINTER_* value in a to OPT_PRINT_* value in c, ; with previous/next GBPRINTER_* values in d/e - ld a, [wGBPrinter] + ld a, [wGBPrinterBrightness] and a jr z, .IsLightest cp GBPRINTER_LIGHTER diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm index b3efa9d86..178a889a3 100644 --- a/engine/overworld/events.asm +++ b/engine/overworld/events.asm @@ -560,7 +560,7 @@ TryObjectEvent: ld de, 3 ld hl, .pointers call IsInArray - jr nc, .nope_bugged + jr nc, .nope pop bc inc hl @@ -569,7 +569,7 @@ TryObjectEvent: ld l, a jp hl -.nope_bugged +.nope ; pop bc xor a ret diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm index 8c659c27e..93945113c 100644 --- a/engine/printer/printer.asm +++ b/engine/printer/printer.asm @@ -30,7 +30,7 @@ Printer_PrepareTileMapForPrint: push af call Printer_StartTransmission pop af - ld [wcbfa], a + ld [wPrinterMargins], a call Printer_CopyTileMapToBuffer ret @@ -60,8 +60,8 @@ PrintDexEntry: ldh [rIE], a call Printer_StartTransmission - ld a, $10 - ld [wcbfa], a + ln a, 1, 0 + ld [wPrinterMargins], a farcall PrintPage1 call ClearTileMap ld a, %11100100 @@ -86,8 +86,8 @@ PrintDexEntry: ldh [hBGMapMode], a call Printer_StartTransmission - ld a, $3 - ld [wcbfa], a + ln a, 0, 3 + ld [wPrinterMargins], a farcall PrintPage2 call Printer_ResetJoypadRegisters ld a, 4 @@ -151,7 +151,7 @@ PrintPCBox: xor a ldh [hBGMapMode], a call PrintPCBox_Page1 - ld a, $10 ; to be loaded to wcbfa + ln a, 1, 0 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint call Printer_ResetRegistersAndStartDataSend jr c, .cancel @@ -162,7 +162,7 @@ PrintPCBox: xor a ldh [hBGMapMode], a call PrintPCBox_Page2 - ld a, $0 ; to be loaded to wcbfa + ln a, 0, 0 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint call Printer_ResetRegistersAndStartDataSend jr c, .cancel @@ -174,7 +174,7 @@ PrintPCBox: xor a ldh [hBGMapMode], a call PrintPCBox_Page3 - ld a, $0 ; to be loaded to wcbfa + ln a, 0, 0 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint call Printer_ResetRegistersAndStartDataSend jr c, .cancel @@ -186,7 +186,7 @@ PrintPCBox: xor a ldh [hBGMapMode], a call PrintPCBox_Page4 - ld a, $3 ; to be loaded to wcbfa + ln a, 0, 3 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint call Printer_ResetRegistersAndStartDataSend .cancel @@ -229,7 +229,7 @@ PrintUnownStamp: ldh [hBGMapMode], a call LoadTileMapToTempTileMap farcall PlaceUnownPrinterFrontpic - ld a, $0 ; to be loaded to wcbfa + ln a, 0, 0 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint call Call_LoadTempTileMapToTileMap call Printer_ResetJoypadRegisters @@ -290,7 +290,7 @@ PrintMail: xor a ldh [hBGMapMode], a - ld a, $13 ; to be loaded to wcbfa + ln a, 1, 3 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint ld hl, hVBlank ld a, [hl] @@ -332,7 +332,7 @@ PrintPartymon: xor a ldh [hBGMapMode], a farcall PrintPartyMonPage1 - ld a, $10 ; to be loaded to wcbfa + ln a, 1, 0 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint ld hl, hVBlank @@ -353,7 +353,7 @@ PrintPartymon: xor a ldh [hBGMapMode], a farcall PrintPartyMonPage2 - ld a, $3 ; to be loaded to wcbfa + ln a, 0, 3 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint ld a, 18 / 2 @@ -398,7 +398,7 @@ _PrintDiploma: push af ld [hl], %0100 - ld a, $10 ; to be loaded to wcbfa + ln a, 1, 0 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint call Printer_ResetJoypadRegisters @@ -416,7 +416,7 @@ _PrintDiploma: farcall PrintDiplomaPage2 - ld a, $3 ; to be loaded to wcbfa + ln a, 0, 3 ; to be loaded to wPrinterMargins call Printer_PrepareTileMapForPrint call Call_LoadTempTileMapToTileMap call Printer_ResetJoypadRegisters @@ -820,7 +820,7 @@ Printer_GetMonGender: ld l, a ld a, [wAddrOfBoxToPrint + 1] ld h, a - ld bc, $2b + ld bc, 2 + MONS_PER_BOX + MON_DVS add hl, bc ld bc, BOXMON_STRUCT_LENGTH ld a, [wWhichBoxMonToPrint] diff --git a/engine/printer/printer_serial.asm b/engine/printer/printer_serial.asm index 2ac75ca33..154cc2fd4 100644 --- a/engine/printer/printer_serial.asm +++ b/engine/printer/printer_serial.asm @@ -9,8 +9,8 @@ Printer_StartTransmission: ld [wPrinterOpcode], a ld hl, wPrinterConnectionOpen set 0, [hl] - ld a, [wGBPrinter] - ld [wGBPrinterSettings], a + ld a, [wGBPrinterBrightness] + ld [wPrinterExposureTime], a xor a ld [wJumptableIndex], a ret @@ -353,11 +353,11 @@ Printer_ComputeChecksum: Printer_StageHeaderForSend: ld a, $1 ld [wGameboyPrinter2bppSource + 0], a - ld a, [wcbfa] + ld a, [wPrinterMargins] ld [wGameboyPrinter2bppSource + 1], a - ld a, %11100100 + ld a, %11100100 ; 3,2,1,0 ld [wGameboyPrinter2bppSource + 2], a - ld a, [wGBPrinterSettings] + ld a, [wPrinterExposureTime] ld [wGameboyPrinter2bppSource + 3], a ret @@ -957,8 +957,9 @@ wPrinterTileMapBuffer:: ds SCREEN_HEIGHT * SCREEN_WIDTH ; ca90 wPrinterTileMapBufferEnd:: wPrinterStatus:: db ; cbf8 ds 1 -wcbfa:: db -wGBPrinterSettings:: db +; High nibble is for margin before the image, low nibble is for after. +wPrinterMargins:: db ; cbfa +wPrinterExposureTime:: db ; cbfb ds 16 wGameboyPrinterRAMEnd:: @@ -1583,7 +1584,7 @@ wTextboxFlags:: ; bit 0: 1-frame text delay ; bit 4: no text delay db -wGBPrinter:: ; cfd0 +wGBPrinterBrightness:: ; cfd0 ; bit 0-6: brightness ; lightest: $00 ; lighter: $20 |