Atari 8bit image loader supporting binary PBM and its own YAI format.
If you have a FujiNet you can view streamed images from the search terms you enter.
Using custom display lists YAIL is able to display 220 lines instead of the default 192. This means that when loading a PBM (black and white) image the display will be in Graphics 8 (ANTIC F) at a 320x220 resolution.
YAIL has a simple text console for interaction that is activated when you start to type. Commands:
- help - List of commands
- load - Loads the specified PBM/PGM files and now a new YAI file.
- save - Saves the current image and graphics state to a YAI file.
- cls - Clears the screen
- gfx # (0, 8, 9, 20) - (For Atari) Change the graphics mode to the number specified
- search - Stream images found on the internet using DDG from the yail.py.
- generate - Stream images generated using AI from the yail.py.
- set server - Give the N:TCP URL for the location of the yailsrv.py. Ex: set server N:TCP://192.168.1.205:9999/
- quit - Quit the application
Tested on and works with the Atari 800XL. Other models, YMMV
Usage: YAIL.XEX [OPTIONS]
-h this message
-l load image file
-u use this server address
-s search terms
The server is written in Python and provides various image streaming capabilities for the YAIL client on Atari 8-bit computers via FujiNet.
- Multi-API Image Generation: Generate images using OpenAI's DALL-E 3 model or Google's Gemini model
- Local Image Streaming: Stream images from a local directory
- Web Camera Support: Stream live video from a connected webcam
- Multiple Graphics Modes: Support for different Atari graphics modes (8, 9, and VBXE)
- Custom Image Processing: Automatically resize, crop, and format images for optimal display on Atari
- HTTP Request Handling: Properly responds to HTTP requests with appropriate messages
- Network Detection: Automatically detects available network interfaces and recommends the best IP for connections
- Python 3.6+
- Required Python packages (install via pip):
- requests
- duckduckgo_search
- fastcore
- pillow
- tqdm
- olefile
- numpy
- pygame
- openai
- python-dotenv
- netifaces
- google-generativeai (for Gemini support)
The YAIL server can process the following commands from clients:
generate <prompt>
orgen <prompt>
: Generate an image using the configured image generation modelsearch <terms>
: Search for images using the provided terms (redirects to image generation)camera
: Stream from a connected webcamopenai
: Configure image generation settingsgfx <mode>
: Set the graphics modequit
: Exit the client connection
The server can be configured using environment variables. Copy the deployment/env.example
file to server/env
and edit it to set your API keys and preferences:
# Image Generation API Configuration
OPENAI_API_KEY=your_openai_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here_if_needed
# Image Generation Model Configuration
GEN_MODEL=dall-e-3 # Options: dall-e-3, dall-e-2, gemini
# OpenAI-specific Configuration (used only with dall-e models)
OPENAI_SIZE=1024x1024
OPENAI_QUALITY=standard
OPENAI_STYLE=vivid
OPENAI_SYSTEM_PROMPT='You are an expert illustrator creating beautiful, imaginative artwork'
- For OpenAI models (dall-e-3, dall-e-2), you need an OpenAI API key from OpenAI's platform
- For Google Gemini model, you need a Gemini API key from Google AI Studio
The server supports multiple image generation models:
-
OpenAI DALL-E Models:
dall-e-3
: High-quality image generation with detailed prompt followingdall-e-2
: Faster generation with lower cost- Other OpenAI models as they become available
-
Google Gemini Models:
gemini-2.5-pro-exp-03-25
: Google's advanced image generation model- Other Gemini models as they become available
Set your preferred model using the GEN_MODEL
environment variable or the --gen-model
command-line argument. The server automatically detects which API to use based on the model name prefix:
- Models starting with
dall-e-
orgpt-
use the OpenAI API - Models starting with
gemini
use the Google Gemini API
# Example: Using OpenAI DALL-E 3
GEN_MODEL=dall-e-3
# Example: Using Google Gemini
GEN_MODEL=gemini-2.5-pro-exp-03-25
The deployment
directory contains scripts and configuration files to help deploy the YAIL server as a systemd service on Linux systems.
fujinet-yail.service
: Systemd service file that properly activates the Python virtual environmentdeploy.sh
: Installation script that sets up the service, environment, and dependenciestest_service.sh
: Script to test the YAIL server via curl, automatically detecting server IP and portenv.example
: Example environment configuration file
- Clone the repository
- Navigate to the deployment directory
- Run the deployment script:
./deploy.sh
- The script will:
- Create a Python virtual environment
- Install required dependencies
- Set up the systemd service
- Configure environment variables
The deployment
directory also contains test scripts to verify the server's functionality:
test_service.sh
: Tests basic connectivity to the YAIL servertest_gen_command.py
: Tests the image generation functionalitytest_image_gen.py
: Advanced testing script with detailed binary data analysistest_server_logs.py
: Monitors server logs during testing
# Test basic connectivity
./deployment/test_service.sh
# Test image generation
python deployment/test_gen_command.py "happy people dancing"
-
Start the server with local images:
python server/yail.py --paths /path/to/images --loglevel INFO
-
Start the server with OpenAI's DALL-E 3 for image generation:
python server/yail.py --openai-api-key your_api_key_here --gen-model dall-e-3
-
Start the server with Google's Gemini model for image generation:
python server/yail.py --gen-model gemini
-
Start the server as a systemd service:
sudo systemctl start fujinet-yail