Giter Club home page Giter Club logo

Comments (4)

zbyti avatar zbyti commented on May 25, 2024

I made workaround for my VBI procedure here: https://github.com/zbyti/simple-games-easy-for-develop/blob/master/Mad%20Pascal/snake/src/game.inc

from mad-pascal.

zbyti avatar zbyti commented on May 25, 2024
procedure vbi; keep;
begin
  if not game_over then begin
    update_time;
    snake_step;
    if not fruit_on_board then put_fruit;
    if time_bcd = TIME_THOLD then game_over := true;
  end;
end;

//o-------------------------------------------------------------o

procedure prepare;
begin
  Move(pointer(CRT_CHARS_ADR), pointer(CHARSET_ADR), CHARSET_SIZE);
  Move(pointer(CRT_TITLE_ADR), pointer(SCREEN_ADR), SCREEN_SIZE);

  {*
    hack for the compiler, call vbi procedure
    in other case optimizer remove unused - from his point of view - code
  
    vbi;
  *}
end;

MadPascal/samples/vic-20/snake$ make
rm -f output/* bin/*
/home/zbyti/Programs/MadPascal/mp src/vic20.pas -t raw -code A009 -o output/vic20.a65
Mad Pascal Compiler version 1.6.6 [2022/04/12] for 6502
Compiling src/vic20.pas
src/vic20.pas (12) Note: Local const 'GAME_BLACK' not used
src/vic20.pas (14) Note: Local const 'GAME_RED' not used
src/vic20.pas (15) Note: Local const 'GAME_CYAN' not used
src/vic20.pas (16) Note: Local const 'GAME_PURPLE' not used
src/vic20.pas (18) Note: Local const 'GAME_BLUE' not used
src/vic20.pas (20) Note: Local const 'GAME_ORANGE' not used
src/game.inc (69) Note: Local absolutevar 'SF0B' not used
src/game.inc (70) Note: Local absolutevar 'SF1B' not used
49 lines compiled, 0.81 sec, 8017 tokens, 627 idents, 217 blocks, 6 types
8 note(s) issued
/home/zbyti/Programs/mads/mads output/vic20.a65 -x -i:/home/zbyti/Programs/MadPascal/base -o:output/vic20-core.bin
ZPAGE: $0000..$0053
RTLIB: $A07C..$A113
SYSTEM: $A12D..$A143
SYS_VIC20: $A144..$A28E
CODE: $A00C..$A548
DATA: $A55C..$A55E
$R RCDATA  $B912..$BBFF 'res/title_cbm.scr'
$R RCDATA  $BC00..$BFFF 'res/snake_cbm.fnt'
        .local +MAIN.UPDATE_TIME
vic20.a65 (1238) ERROR: Undeclared label MAIN.UPDATE_TIME (BANK=0)
        .local +MAIN.SNAKE_STEP
vic20.a65 (1244) ERROR: Undeclared label MAIN.SNAKE_STEP (BANK=0)
        m@INLINE
vic20.a65 (1239) ERROR: Undeclared macro M@INLINE (BANK=0)
vic20.a65 (1245) ERROR: Undeclared macro M@INLINE (BANK=0)
        jsr PUT_FRUIT
vic20.a65 (1252) ERROR: Undeclared label PUT_FRUIT (BANK=0)
Writing listing file...
make: *** [makefile:11: build-vic20] Error 2

from mad-pascal.

zbyti avatar zbyti commented on May 25, 2024

#93

from mad-pascal.

zbyti avatar zbyti commented on May 25, 2024

05c0045

from mad-pascal.

Related Issues (20)

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.