Skip to content

Commit

Permalink
improve docs, rename art to images
Browse files Browse the repository at this point in the history
  • Loading branch information
rnayabed committed Jan 25, 2025
1 parent 9e44b3f commit 913f2f7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Sutra-1 / সুত্র-1 / सूत्र-1

*Simple 10-bit CPU from scratch*
*10-bit CPU and Assembler*

<img src="https://raw.githubusercontent.com/rnayabed/sutra-1/refs/heads/master/screenshots/main.png" alt="Sutra-1 Main Screenshot">

Expand Down
18 changes: 9 additions & 9 deletions docs/display.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,32 @@ I have included a simple companion program that can generate program to print so
python shilpi.py -t 'namaste world'
```

This generates an output assembly file with the name `art.S` which can then be compiled by rochoyita
This generates an output assembly file with the name `display-image.S` which can then be compiled by rochoyita

```
python rochoyita.py art.S
python rochoyita.py display-image.S
```

This will generate an output file `art.hex` that can then be loaded to memory in our `main` circuit inside Logisim Evolution
This will generate an output file `display-image.hex` that can then be loaded to memory in our `main` circuit inside Logisim Evolution

<img src="https://raw.githubusercontent.com/rnayabed/sutra-1/refs/heads/master/screenshots/shilpi-text.png" alt="Shilpi text mode screenshot">

### Image mode

We can also provide it a 64x32 1-bit image formatted with pixel ON as '#' and OFF as '.'. A blank template is provided in `examples/art/blank.txt`
We can also provide it a 64x32 1-bit image formatted with pixel ON as '#' and OFF as '.'. A blank template is provided in `examples/images/blank.txt`

I have also included some 1-bit images in `examples/art` that can be parsed by shilpi and rendered on Sutra-1
I have also included some 1-bit images in `examples/images` that can be parsed by shilpi and rendered on Sutra-1

```shell
python shilpi.py examples/art/india.txt
python shilpi.py examples/images/india.txt
```

This generates an output assembly file with the name `art.S` which can then be compiled by rochoyita
This generates an output assembly file with the name `display-image.S` which can then be compiled by rochoyita

```shell
python rochoyita.py art.S
python rochoyita.py display-image.S
```

This will generate an output file `art.hex` that can then be loaded to memory in our `main` circuit inside Logisim Evolution
This will generate an output file `display-image.hex` that can then be loaded to memory in our `main` circuit inside Logisim Evolution

<img src="https://raw.githubusercontent.com/rnayabed/sutra-1/refs/heads/master/screenshots/shilpi-image.png" alt="Shilpi image mode screenshot">
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions shilpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,12 @@ def generate_art_from_text(text):

if args.text:
art = generate_art_from_text(args.input)
output_file_name = args.output if args.output else 'art.S'
output_file_name = args.output if args.output else 'display-image.S'
print(art)
else:
input_file_name = args.input

output_file_name = args.output if args.output else f'{Path.cwd()}{os.sep}art.S'
output_file_name = args.output if args.output else f'{Path.cwd()}{os.sep}display-image.S'

with open(input_file_name, 'r') as f:
# art = f.readlines()
Expand Down

0 comments on commit 913f2f7

Please sign in to comment.