Giter Site home page Giter Site logo

x16-demo's Introduction

This project has moved

Please find our project at its new repository: https://github.com/x16community/x16-demo.

The Commander X16 team and community would like to apologize for any confusion the new repo has caused, and we hope the new location will be permanent.

x16-demo's People

Contributors

bobbyjim avatar cjlove avatar codewar65 avatar crb02005 avatar daitangio avatar egonolsen71 avatar f3liscatus avatar frank-buss avatar greg-king5 avatar indigodarkwolf avatar jestin avatar justinbaldock avatar lrflew avatar m00dawg avatar maxgerhardt avatar mist64 avatar mobluse avatar oleg-imanilov avatar rnentjes avatar rpontual avatar rsbohn avatar sererris avatar spydertl avatar tomxp411 avatar wmoxam avatar zerobyteorg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

x16-demo's Issues

Failed to compile: cl65: No such target system: `cx16'

When I try to compile the adudio part I get:

make[1]: Entering directory '/mnt/s/code/x16-demo/cc65-audio'
cl65 -t cx16 -O -o audio.prg main.c
cl65: No such target system: `cx16'

My cc65 version:

$ cc65 --version
cc65 V2.16 - Ubuntu 2.16-2

Which version of cc65 I need to use to fix it? I need a special configuraiton?

Fails to compile with latest cl65

make[1]: Entering directory '/home/max/x16-demo/cc65-audio'
python3 ../tools/bin2c.py vgmData test.vgm vgm.inc
cl65 -t cx16 -O -o audio.prg main.c
main.c:39: Error: Macro redefinition is not identical
main.c:65: Error: No field named 'reg' found in 'volatile struct YM2151_t'
main.c:65: Error: Assignment to rvalue
main.c:66: Error: No field named 'data' found in 'volatile struct YM2151_t'
main.c:66: Error: Assignment to rvalue
main.c:102: Warning: Pointer conversion to 'char *' from 'unsigned char * const' changes pointee signedness
5 errors and 1 warnings generated.
make[1]: *** [Makefile:4: audio.prg] Error 1
make[1]: Leaving directory '/home/max/x16-demo/cc65-audio'
make: *** [Makefile:22: cc65-audio] Error 2

With

$ cl65 --version
cl65 V2.19 - Git a09053ce0

Which is the latest from the git (cc65/cc65@a09053c)

sei and cli in demo-code

probably the comments are wrong for:

// disable interrupts
__asm__("sei");

// enable interrupts
__asm__("cli");

Author and license should be added to the BASIC programs

According to CONTRIBUTING.md BASIC programs should have author and license in the head of the file using REMs:
"Do not forget to add AUTHOR AND LICENSE information in the head of the file via REMs"
Only one of the programs have this AFAIK: aritm-x16.bas. I think author and license should be added to the BASIC programs that doesn't have this already using REMs in the first few lines of the program.

FileNotFoundError: [Errno 2] No such file or directory: 'SNAKE-NO-DIM.PRG.TMP' -> './release/PRG/SNAKE-NO-DIM.PRG'

I just tried to compile the demos for the first time in a while, but get the aforementioned error.

Even downloading a clean copy of the Git produces the same results. I am also using the up-to-the-minute git of cc65, x16-rom, and x16-emulator.

15:16:37 evil@P950ER ~/src» cd x16-demo
15:17:10 evil@P950ER ~/src/x16-demo» make clean
rm -rf release
15:17:12 evil@P950ER ~/src/x16-demo» make
make -C petdrawx16
make -C assembly
make[1]: Entering directory '/home/evil/src/x16-demo/petdrawx16'
acme -f cbm -o petdrawx16.prg petdrawx16.asm
make[1]: Entering directory '/home/evil/src/x16-demo/assembly'
acme -f cbm -DMACHINE_C64=0 -o mode4-demo.prg mode4-demo.asm
acme -f cbm -DMACHINE_C64=1 -o 64mode4-demo.prg mode4-demo.asm
make[1]: Leaving directory '/home/evil/src/x16-demo/petdrawx16'
make -C basic-sprite
acme -f cbm -DMACHINE_C64=0 -o mode7-demo.prg mode7-demo.asm
make[1]: Entering directory '/home/evil/src/x16-demo/basic-sprite'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/evil/src/x16-demo/basic-sprite'
make -C cc65-audio
acme -f cbm -DMACHINE_C64=1 -o 64mode7-demo.prg mode7-demo.asm
acme -f cbm -DMACHINE_C64=0 -o sprite-demo.prg sprite-demo.asm
make[1]: Entering directory '/home/evil/src/x16-demo/cc65-audio'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/evil/src/x16-demo/cc65-audio'
make -C cc65-sprite
acme -f cbm -DMACHINE_C64=1 -o 64sprite-demo.prg sprite-demo.asm
make[1]: Entering directory '/home/evil/src/x16-demo/cc65-sprite'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/evil/src/x16-demo/cc65-sprite'
make[1]: Leaving directory '/home/evil/src/x16-demo/assembly'
rm -rf release
mkdir -p release/basic
mkdir -p release/PRG
cp assembly/mode4-demo.prg release/PRG
cp assembly/mode7-demo.prg release/PRG
cp assembly/sprite-demo.prg release/PRG
cp cc65-audio/audio.prg release/PRG
cp cc65-sprite/demo.prg release/PRG
cp basic-sprite/smiley.bas release/basic
cp basic/* release/basic
cp "layer demo/layer-demo.bas" release/basic
./tools/bas2prg.py ../x16-emulator/x16emu ./release/basic ./release/PRG
converting file ./release/basic/snake-no-dim.bas...
Traceback (most recent call last):
  File "./tools/bas2prg.py", line 62, in <module>
    os.rename(prg, prgFilename)
FileNotFoundError: [Errno 2] No such file or directory: 'SNAKE-NO-DIM.PRG.TMP' -> './release/PRG/SNAKE-NO-DIM.PRG'
make: *** [Makefile:15: all] Error 1

cc65-sprite demo doesn't appear to work

It compiles fine on my Linux host (using cc65 V2.17 - Ubuntu 2.17-1), but when I run it in the emulator I get this result:
https://youtu.be/ZIYJwpen0zA

It seems to just hang on exit and the emulator goes to 100% CPU. I'm assuming that's not what it's supposed to do.

Tested with pre-built Linux binary and with x16emu built from source.

'layer demo' doesn't work in x16emu r34

'layer demo' doesn't work in x16emu r34. It worked in x16emu r33, but doesn't work in r34 or the latest from master on GitHub. This is probably due to changed addresses in RAM. One could find these addresses in rom.sym from r33 and then look up what they should be in rom.sym for r34.

Contrib guidelines (proposal)

IMHO I think we should add a small contribution guidelines in a form of a file called CONTRIBUTING.md.

I can take care of it, if the rest of the team agree.
I think we could add at least:

For basic files:

  1. contribute with .bas file (not binary)
  2. bas file must be in ascii UTF-8 (not sure if it is right) with uppercase letter
  3. If needed renumber them using the renumber tool
  4. if subrotudine, provide at least one usage example
  5. Do not forget to add AUTHOR AND LICENSE information in the head of the file via REMs

For assembly code:

  1. Group your code in one directory per project
  2. Include a Makefile per project
  3. Include the directory in the main Makefile, adding it to the SUBDIRS variable (first line)
  4. Test it (see HOW TO COMPILE in the README)
  5. Do not forget to add AUTHOR AND LICENSE information in the head of the file via ; comments

Do you have other concepts we need to add to these guidelines?

cc65-sprite question

Hey, do you mind if we use issues to ask questions about the demos, or is there a better place to do so?

I'm trying to understand this line. Where does 0x010000 come from?

// Address bits 16:13 (starting at 0x010000) and 8 BPP mode
VERA.data0 = (1 << 7) | (0x010000 >> 13);

From:

// Address bits 16:13 (starting at 0x010000) and 8 BPP mode

DEMO.PRG crashes emulator

I haven't looked into why yet, but DEMO.PRG crashes the emulator. Other demos work fine - built clean from source today (10/5).

15:01:15 evil@P950ER ~/src/x16-demo/release/PRG» x16emu -prg SWIMMER.PRG
15:01:56 evil@P950ER ~/src/x16-demo/release/PRG» x16emu -prg ARITM-X16.PRG 
15:06:36 evil@P950ER ~/src/x16-demo/release/PRG» x16emu -prg BLINKEN.PRG 
15:07:45 evil@P950ER ~/src/x16-demo/release/PRG» x16emu -prg CX16LOGO.PRG 
15:08:28 evil@P950ER ~/src/x16-demo/release/PRG» x16emu -prg DEMO.PRG 
Dumped system to dump.bin.
15:08:38 evil@P950ER ~/src/x16-demo/release/PRG» 

Should have releases of demos & try to keep POKEs compatible with C64

The POKEs in BASIC demos have been updated to the release after r34 of x16emu, and it means they don't work in r34. E.g. POKE 713 needs to be POKE 646 in r34.

It would be good to have releases of the demos too, e.g. x16-demo-r34.zip, since they are connected to a particular release of the x16emu, and the demos should be independent of the operating system. In Windows one might need the Ubuntu Linux app or Cygwin to build.

I think one should avoid to change the POKEs compared to C64. Some addresses might need to change, but the most popular POKE addresses I think should remain, because then it will be easier for elderly C64 programmers to transition to CX16. The most popular POKE addresses are probably those mentioned in the C64 manual. Obviously some POKE addresses can't be kept because the hardware is different and some are replaced by other VPOKE addresses.

Can't compile cc65-sprite

I am having an issue with the cc65 part of the makefile. When I type in the command that was listed in the makefile, it shows a lot of errors. Is it me or is the code?

Can't compile on Ubuntu 18.04

I downloaded and tried to compile it on Ubuntu 18.04 but encountered the following error messages.
demo.c:38:10: fatal error: conio.h: No such file or directory
demo.c:40:10: fatal error: cbm.h: No such file or directory

Apparently this was written for an MSDOS compiler. I don't believe these two include files are necessary and they should either be commented out or deleted.

png2sprite.py errors

This script is erroring out when I try to run it on one of my bitmap files.

17:27 $ ../tools/png2sprite.py -n 10000 -f basic KRAKEN.PNG test.txt 
Traceback (most recent call last):
  File "../tools/png2sprite.py", line 84, in <module>
    r, g, b, a = p[y][x]
TypeError: 'numpy.uint8' object is not iterable

The bitmap I'm using is from NES ROM data which is 4 bits per pixel. Any idea how to fix this? Line 84 appears to be reading pixel color data however I'm not familiar with the PIL module.

png2sprite produces lowercase hex that doesn't copy-paste into BASIC

Line 113:
if args.f == 'acme' or args.f == 'basic': file.write("$%02x" % best)

Writes to file:
10007 DATA $00,$00,$00,__$bc__,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

Pastes to BASIC:
10007 DATA $00,$00,$00,__$|-__,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

LIST outputs:
10007 DATA $00,$00,$00,__$__,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

Changing the string formatting to use capital-letter-X HEX formatting will fix output for BASIC, but I don't know if this will fix or break ACME:
if args.f == 'acme' or args.f == 'basic': file.write("$%02X" % best)

I don't use ACME. Can someone verify and submit the best fix to keep this DRY?

Thanks.

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.