Mostrando las entradas con la etiqueta c. Mostrar todas las entradas
Mostrando las entradas con la etiqueta c. Mostrar todas las entradas

viernes, 2 de enero de 2026

Copo de nieve cc65

 codigo...

 

#include <stdio.h>

#define L 10

void m(const char*l,char*r){
    unsigned char i;
    for(i=0;i<L;i++)r[i]=l[i];
    for(i=0;i<L-1;i++)r[L+i]=l[L-2-i];
    r[L+L-1]='\0';
}

int main(void){
    static const char*t[]={
        "         X",
        "       X X",
        "  X X   XX",
        "   XX    X",
        "  XXX  X X",
        "     X  XX",
        "      X  X",
        " X  X  X X",
        "  X  X  XX",
        "XXXXXXXXXX"
    };
    unsigned char n=10,i;
    char b[21];
    
    puts("");
    for(i=0;i<n;i++){
        m(t[i],b);
        puts(b);
    }
    for(i=n-1;i-->0;){
        m(t[i],b);
        puts(b);
    }
    for(;;);
}

jueves, 23 de octubre de 2025

cc65-Chess

Chess portable hecho en cc65.

Keys: 

  • arrows keys
  • return

Lento el chess, lo mas simpatico es que es portable.

Esta bugoso, se comio su caballo, y el peon aparecio abajo.

Jugue dos veces, ya que se salto a las negras...

Se agradece el esfuerzo y desarrollo del juego, pero necesita mas trabajo.





https://github.com/StewBC/cc65-Chess




lunes, 8 de enero de 2024

Silicon Valley s03e01




 

#include <stdio.h>
#include <stdlib.h>

typedef unsigned long u64;

typedef void enc_cfg_t;
typedef int enc_cfg2_t;
typedef __int128_t dcf_t;

enc_cfg_t _ctx_iface(dcf_t s, enc_cfg2_t i) {
  int c = (((s & ((dcf_t)0x1FULL << i * 5)) >> i * 5) + 65);
  printf("%c", c); }
enc_cfg2_t main() {
  for (int i=0;i<17; i++) {
    _ctx_iface(0x79481E6BBCC01223 + ((dcf_t)0x1222DC << 64), i);
  }
}


result:

DREAM_ON_ASSHOLES




sábado, 18 de junio de 2022

Galaxian Hardware

Galaxian hardware fue usado para hacer bootlegs de juegos conocidos

Tambien se uso el mismo hardware para Galaga y otros juegos.

Konami lo usó para Scramble y Frogger.


sega z80 based hardware



Technical specifications

The technical specifications for this hardware include:[1][2][3][4]

 

https://segaretro.org/Galaxian-based_hardware

http://www.system16.com/hardware.php?id=513

https://github.com/mamedev/mame/blob/master/src/mame/drivers/galaxian.cpp

https://github.com/mamedev/mame/tree/master/src/mame/galaxian

https://retrocomputing.stackexchange.com/questions/4733/how-did-z80-multiprocessing-work-in-the-namco-galaga-hardware

http://manillismo.blogspot.com/2022/06/making-8-bit-arcade-games-in-c.html

 

   Schematics are known to exist for these games:
        * Galaxian
        * Moon Alien Part 2
        * King and Balloon

        * Moon Cresta
        * Moon Shuttle

        * Frogger
        * Amidar
        * Turtles

        * Scramble
        * The End

        * Super Cobra
        * Dark Planet
        * Lost Tomb

        * Dambusters

jump bug


---


The Galaxian hardware was a popular arcade system board developed by Namco in the late 1970s. It powered several classic arcade games. Here is a list of games that used the Galaxian hardware:

Galaxian (1979) - The original game that the Galaxian hardware was developed for. It is a fixed shooter game where players control a spaceship and must destroy waves of attacking alien ships.

Moon Cresta (1980) - This game added a unique feature to the Galaxian hardware, allowing players to dock their spaceships to form a more powerful ship. It also introduced multiple stages and boss battles.

The End (1980) - A shooter game where players defend a planet against waves of enemy ships. It featured a distinct energy-based gameplay mechanic.

Stratovox (1980) - A vertical shooter game with speech synthesis. Players control a spaceship and must destroy enemy ships while defending their base.

Jump Bug (1981) - A platform game where players control a bug-like creature that can jump on platforms and shoot at enemies. It added a unique twist to the Galaxian hardware's capabilities.

King & Balloon (1981) - A fixed shooter game with a tower defense element. Players protect a castle from enemy balloons using cannons.

War of the Bugs (1981) - Similar to Jump Bug, this game featured platforming elements where players control a bug and must navigate levels while shooting enemies.

Omega Race (1981) - A space-themed shooter game where players control a spaceship and battle against enemy ships and asteroids.

 

viernes, 12 de junio de 2020

Franny (mirror)

Subi un fork de Franny a github: 
https://github.com/devwebcl/franny-mirror

Ya que es un proyecto viejo, pero util, ademas existe un parche desde foro Polaco.

Ademas, no existe versiones ejecutable win32 fácil de encontrar.

https://github.com/devwebcl/franny-mirror/releases/tag/v1.1.3



http://www.atari.org.pl/forum/viewtopic.php?id=8073&p=2

patch -p0 <franny-20140107-sdx2x512bps.diff

---

franny -L pollo.atr






lunes, 28 de enero de 2019

cc65 cheat sheet

1.
if a variable is declared not on the top of a function then:

line 34:     int i;

hello.c(34): Error: Expression expected
hello.c(34): Warning: Statement has no effect
hello.c(34): Error: `;' expected
hello.c(34): Error: Undefined symbol: `i'
hello.c(34): Warning: Statement has no effect

with c99 this error must not be, but still I'm getting it:

cl65 --standard c99 -t atari hello-c89.c -o hello-c89.xex 
hello-c89.c(12): Error: Expression expected

2.
cl65 -t atari hello.c -o hello.xex
target atarixl provides more free memory. (see 4)

3.
since version 2.13 environment variable is : $(CC65_HOME)

instead of: CC65_INC

4.
Segment `BSS' overflows memory area `MAIN' by 12345 bytes

One possibility is to change start address of your program. The default value is typically 8192, you can try decreasing it to 6144. You can do it by passing the -S 6144 option to the ld65 linker.


https://en.wikipedia.org/wiki/Data_segment

5.
https://cc65.github.io/doc/atari.html
Definitions of memory.

6.
https://www.cc65.org/doc/cc65-2.html
arguments for command line compiler.

-Cl Make local variables static 
-O Optimize code 
-Oi Optimize code, inline more code 
-o name Name the output file 

7.
https://www.cc65.org/doc/coding.html

1. Use prototypes
2. Don't declare auto variables in nested function blocks
3. Remember that the compiler does no high level optimizations
4. Longs are slow!
5. Use unsigned types wherever possible
6. Use chars instead of ints if possible
7. Make the size of your array elements one of 1, 2, 4, 8
8. Expressions are evaluated from left to right
9. Use the preincrement and predecrement operators
10. Use constants to access absolute memory locations
11. Use initialized local variables
12. Use the array operator [] even for pointers
13. Use register variables with care
14. Decimal constants greater than 0x7FFF are actually long ints
15. Access to parameters in variadic functions is expensive

8. Optimizing C array lookups
http://8bitworkshop.com/blog/compilers/2019/03/17/cc65-optimization.html


9. Fácil acceso a Peeks and Pokes" en C.
http://atariage.com/forums/topic/289164-cc65-news-os-structure/#entry4236915

10.
Advanced optimizations in CC65
https://github.com/ilmenit/CC65-Advanced-Optimizations

11.
Global variables
ojala todo sea variables globales asi usamos menos el stack


domingo, 4 de diciembre de 2016

Scott Adams Driver

Antiguo post que deseo darle un revival a todo lo relativo a cc65

por devwebcl » Vie Oct 19, 2007 6:03 pm
Hello,

Hola,

Una vez mas jugando con el cc65 y Textos de aventuras pude portar el Scottfree

El problema surge despues de la compilacion la memoria disponible es muy pequeña, por lo tanto todos los juegos quedan "out of memory", sin embargo hay un pequeño juego de aventura llamado Cloak Darkness, suficientemente pequeño para ser portado a diferentes dialectos de juegos de textos de aventura (es similar al Hola Mundo).

El juego puede ser bajado desde http://devwebcl.atarionline.pl/cc65/cloak.xex


Como se puede ver es una liberacion bien alpha, donde no hay control del despliegue (como usualmente es en este tipo de juegos).

La idea final era ver si era posible algo con este parser , compilar y ser funcional en el a8.

sábado, 3 de diciembre de 2016

sábado, 2 de enero de 2016

First Chess cc65

Un ajedrez de  Pham Hong Nguyen que porté tiempo atrás.

Publicacion atariware:
existe varios codigos abiertos sobre ajedreces que intentan mas que nada enseñar a programar uno de estos -como TSCP http://home.comcast.net/~tckerrigan/ - en todo caso el First Chess http://www.geocities.com/axchess/firstchess.html es uno muy simple -que juega mal, capaz que sea mejor que el que aparecio en panorama bits :wink: - pero lo bueno que es trivial compilarlo en el cc65 y jugarlo :P

Buscando mas info para cc65, eonctré un sitio con una recopilacion exhaustiva de chess engines, frontends, etc.. Donde se menciona este port y muestran el screenshot de atari :P

https://chessprogramming.wikispaces.com/Firstchess

Lo exotico, es que este juego no fue creado originalmente para cc65, pero por su simpleza fue viable portarlo.


martes, 13 de octubre de 2015

Account/Cuenta Ghostbusters Atari

Basado en el codigo y trabajo de:
-------------------------- 
Based on code from:
    printf("  Original analysis: Zlin\n");
    printf("  http://goo.gl/8jgCvo\n\n");
    printf("  C++ Code: pararaum\n");
    printf("  https://goo.gl/EHS7aZ\n");

Hice un "port" a cc65:
--------------------------
I made a "port" to cc65:


Para mas detalles ver los posts originales:
--------------------------
For more details check the following posts:

http://manillismo.blogspot.cl/2015/10/cuenta-ghostbuster.html

http://manillismo.blogspot.cl/2010/02/ghostbusters.html

Archivo esta publicado en thread:
--------------------------
File is published in the following thread:
 http://atariage.com/forums/topic/32274-ghostbusters/#entry3343586


UPDATE1:

Como es sabido cc65 tiene varias plataformas como target, entre otras:
(cuales tambien existe Ghostbusters como juego):
--------------------------
As we know, cc65 has different target platforms, among them:
(the game Ghostbusters exits in these platforms as well)



UPDATE2:

Subí la fuente de este port a github:
--------------------------
I uploded the source code of this port at github:

https://github.com/devwebcl/cc65-samples/blob/master/src/ghostbusters/ghostbcc.c