Giter Site home page Giter Site logo

alice32_90_gj's People

Contributors

monos1984 avatar

Stargazers

 avatar Sylvain Glaize avatar

Watchers

Sylvain Glaize avatar  avatar

alice32_90_gj's Issues

Syntaxe 6803 possible pour une meilleure compréhension.

Bonne initiative de documenter tes expériences.

J'aurais cependant quelques suggestions :

  1. Faire ressortir le registre utilisé dans un mnémonique :
C000    8E 00 FF                ldS     #$00FF          Place le pointeur de pile au sommet de la RAM
C003    0F                      di                      Désactive les interruptions (travail temps réel)
C004    DC 15                   ldD     L0015           | Lit le compteur (en $15-$16), ajoute 20 en décimal
C006    C3 00 14                addD    #$0014          | et place le tout dans le 3ème Compare Register.
C009    DD 1C                   stD     L001C           | autrement dit : réveille-nous à t + 20 cycles (1 cycle = 1 µs).
 --
C00B    86 84                   ldaA    #$84            | Règle le Timer Control Register 1 (TCR1)
C00D    97 17                   staA    L0017           | OLVL3=1, OE3=Fais sortir l'état du timer sur la broche P12.
 --
C00F    86 2E                   ldaA    #$2E            | "00101110" dans le Data Register du port 1. Chaque bit correspond
C011    97 02                   staA    L0002           | à l'état d'une broche, sous reserve de l'état du Direction Register.
 --
C013    86 FE                   ldaA    #$FE            | "11111110" : toutes les broches du port 1 en sortie, sauf la
C015    97 00                   staA    L0000           | premiere. P10.
 --
C017    86 10                   ldaA    #$10
C019    97 03                   staA    L0003
C01B    86 14                   ldaA    #$14
C01D    97 01                   staA    L0001

Comme tu peux voir, le registre est mis en capital pour aider à la lecture.

  1. Ce serait bien d'utiliser des macros (il faut voir la doc de vasm6800 pour adapter le style) :
EF9345_R0   = $BF20 ; 48928
EF9345_R1   = $BF21 ; 48929
EF9345_R2   = $BF22 ; 48930
EF9345_R3   = $BF23 ; 48931
EF9345_R4   = $BF24 ; 48932
EF9345_R5   = $BF25 ; 48933
EF9345_R6   = $BF26 ; 48934
EF9345_R8   = $BF27 ; 48935

EF9345_SETA macro
  ldaA \1
  staA \2
endm

EF9345_SETX macro
  ldaA \1,x
  staA \2
endm

EF9345_EXEC macro
  EF9345_SETA \1, EF9345_R8
  jsr EF9345_WAIT 
endm

EF9345_SET_ROR macro
  EF9345_SETA \1, EF9345_R1
  EF9345_EXEC #%10000111
endm

EF9345_SET_DOR macro
  EF9345_SETA \1, EF9345_R0   
  EF9345_EXEC #%10000100
endm

...

BASIC_HEADER macro
  .byte $33, $52, $00, $0a, $9f, $20, $31, $33, $31, $34, $32, $00, $00, $00, $00, $00
endm

...

; -----------------
; - 10 exec 13142 -
; -       $3356   -
; -----------------
  BASIC_HEADER
  
 ...
  
; =====================================
; * Configurer Ror qui est 08 de base *
; =====================================
  EF9345_SET_ROR #8
  
; =========================================================================   
; * Configuration de Dor pour pointer sur la 4em page pour les font users *   
; =========================================================================
  EF9345_SET_DOR #%00100011

...

DEBUT_AFFICHAGE
  ; Configuration d'affichage
  EF9345_SETA #%10000000, EF9345_R2
  
  ; %000 Noir
  ; %001 Rouge
  ; %010 Vert
  ; %011 Orange
  ; %100 un bleu Fonce
  ; %101 Mauve Fonce
  ; %110 un Bleu claire
  ; %111 Mauve claire
  ; Attribut 
  ;      IFFFCBBB
  EF9345_SETA #%01110000, EF9345_R3

  ; Id du tiles 
  EF9345_SETX 0, EF9345_R1
  
  ; Ligne
  EF9345_SETA PY, EF9345_R6
  
  ; Colonne
  EF9345_SETA PX, EF9345_R7
  
  ; Execution
  EF9345_EXEC #1

...

EF9345_WAIT   
  tst EF9345_R0
  bmi EF9345_WAIT   
  rts

Note aussi que tu peux faire une macro EF9345_DISPLAY_TILE :

EF9345_DISPLAY_TILE macro
  ; Configuration d'affichage
  EF9345_SETA #%10000000, EF9345_R2
  
  ; Attribut 
  ;      IFFFCBBB
  EF9345_SETA \4, EF9345_R3

  ; Id du tiles 
  EF9345_SETX \3, EF9345_R1
  
  ; Ligne
  EF9345_SETA \2, EF9345_R6
  
  ; Colonne
  EF9345_SETA \1, EF9345_R7
  
  ; Execution
  EF9345_EXEC #1

...

DEBUT_AFFICHAGE

  ;  Colonne, Ligne, N° Tuile, Attribut 
  EF9345_DISPLAY_TILE PX, PY, 0, #%01110000 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.