加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.py 961 Bytes
一键复制 编辑 原始数据 按行查看 历史
BA4988 提交于 2021-12-09 22:47 . Initial commit
# -*- coding:utf-8 -*-
import sys
import time
import pygame
from ba4988 import BA4988
def update(striped):
screen = pygame.display.set_mode(striped.shape)
clock = pygame.time.Clock()
while 1:
for event in pygame.event.get():
if event.type == pygame.KEYUP:
if event.key ==pygame.K_ESCAPE:
return
elif event.type == pygame.QUIT:
return
pygame.surfarray.blit_array(screen, striped)
clock.tick(30)
pygame.display.update()
def main():
pygame.init()
pygame.display.set_caption('BA4988')
ba4988 = BA4988()
# ba4988.x6502.PC = 0x852A # SysPutPixel
# ba4988.x6502.A = 8 # x
# ba4988.memory[0x0C20] = 0x00
# ba4988.flash[0x17AF] = 0 # y
# ba4988.flash[0x17B0] = 1 # data
ba4988.start()
update(ba4988.display)
ba4988.stop()
# alldone
pygame.quit()
if __name__ == '__main__':
main()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化