From 09c6241ca552c4084fe8c19c2301767a04f2a0e0 Mon Sep 17 00:00:00 2001
From: frankmilliron <34376619+frankmilliron@users.noreply.github.com>
Date: Thu, 16 Jul 2020 05:54:20 -0700
Subject: [PATCH] fix Black Magic on Fastchip (#297)

The latest commit still has issues with Fastchip, despite it fixing the color issues on //c and //c+. I just removed all the acceleration code completely. Seems to work on ][+, //c, //c+, Fastchip, and //gs without issues.
---
 src/prelaunch/black.magic.a | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/prelaunch/black.magic.a b/src/prelaunch/black.magic.a
index d3512e5f7..15e772653 100644
--- a/src/prelaunch/black.magic.a
+++ b/src/prelaunch/black.magic.a
@@ -1,5 +1,5 @@
 ;license:MIT
-;(c) 2019 by qkumba
+;(c) 2019 by qkumba/Tom Greene/Frank M.
 
 !cpu 6502
 !to "build/PRELAUNCH/BLACK.MAGIC",plain
@@ -7,7 +7,8 @@
 
     !source "src/prelaunch/common.a"
 
-         +ENABLE_ACCEL
+                          ; acceleration has problems with Fastchip
+                          ; let's remove it
          lda   #$60
          sta   $9C2
          jsr   $800       ; decompress
@@ -15,23 +16,17 @@
          lda   #$60
          sta   $1B2D
          sta   $D6E6
-         jsr   DisableAccelerator
          jsr   $1B00
-         jsr   EnableAccelerator
          jsr   $D000
          lda   #<callback
          sta   $8D5
          lda   #>callback
          sta   $8D6
-         jsr   DisableAccelerator
-         sta   $C05F
          jmp   $800
 
 callback
          lda   #$4C
          sta   $D6EB
-         jsr   EnableAccelerator
-         sta   $C05F
          jsr   $D003
          ldx   #5
 -        lda   reset, x
@@ -40,8 +35,6 @@ callback
          bpl   -
          lda   #$20
          sta   $D6EB
-         jsr   DisableAccelerator
-         sta   $C05F
          jmp   $D6EE
 
 reset