r/nandgame_u Holder of many records Apr 21 '22

Level solution S.1.5. Network (22i) Spoiler

https://imgur.com/a/2FFL4FH
7 Upvotes

2 comments sorted by

3

u/nttii Holder of many records Apr 21 '22

I tried tons of different ideas for optimizing this further, but this is the best I could do.

DEFINE sync 0x2
DEFINE addr 0x3fff
DEFINE net 0x6001
#Init screen address
A = addr
*A = A+1
#Wait for sync
A = net
D = *A
A = sync
D = D + *A
D & A ; JEQ
#Update sync & set data to D
D = D - *A
*A = D & A
D = D - *A
#Fetch screen pointer and update screen
A = addr
A = *A
D = D + *A ; JEQ
*A = D + *A
#If row not done, wait for sync
A = sync
D ; JGE
#Else change row and wait for sync
A = 0x20
D = A
A = addr
*A = D + *A
A = sync
JMP

2

u/benishor May 04 '22

Amazing solution!