Skip to content

Commit

Permalink
initial upload
Browse files Browse the repository at this point in the history
  • Loading branch information
pronopython committed Feb 12, 2024
1 parent d660846 commit a0e5a62
Show file tree
Hide file tree
Showing 27 changed files with 960 additions and 2 deletions.
Empty file modified LICENSE
100644 → 100755
Empty file.
208 changes: 206 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,206 @@
# hyprafap
HypraFap - Retro Fapping System

# HypraFap - Retro Fapping System

for the Commodore 64

![](img/logo.png)

How would your *digital* adult image collection have been looked in the 1980s?

Ever wondered how your *pron* stash would have looked on floppy disk?

Try it out with HypraFap!

With HypraFap you can store and view 16 beautiful color images per disk side on your Commodore 64!

![](img/3.png)

It of course works on an C64 emulator like VICE, too.

> :eggplant: :sweat_drops: *Note: All sample images on this page are censored*
![](img/5.jpg)

![](img/6.jpg)

![](img/4.jpg)

![](img/9.jpg)

![](img/7.jpg)

# Getting started with the HypraFap Demo Disk

You can try out HypraFap with it's Demo Disk!

Install a C64 emulator like VICE:

[https://vice-emu.sourceforge.io/](https://vice-emu.sourceforge.io/)

You can download the demo disk in d64 format here:

[https://github.com/pronopython/hyprafap/raw/main/hyprafap_demo_disk.d64](https://github.com/pronopython/hyprafap/raw/main/hyprafap_demo_disk.d64)

If you are using VICE, you can Autostart the disk.

Otherwise attach the disk image and load HypraFap with

`LOAD"*",8,1`

and then start it with

`RUN`


It then loads the first image on disk, which in case of this Demo Disk is the index picture.

> :eggplant: :sweat_drops: *Note: Without any fastloader the speed is totally normal for the C64 Floppy: very slow! It takes 25 Seconds to load an image!*
The Demo Disk greets you with images of shoes (sorry no prono d64 disks on github :-) ):

![](img/12.jpg)

Every image in HypraFap has a number or letter. See here how all the images are labled 1-9, A-F. The index you are currently seeing has the number 0.

You can press `Space` to advance to the first image (the one labled 1 in the image):

![](img/11.jpg)

After the image is loaded, press `Space` again to advance to the next image, the shoe image with the brown background.

![](img/13.jpg)

You can directly select an image by pressing its number/letter. Press `5` to jump to the blue image.

![](img/8.jpg)

Press `0` or `i` (as in index) to jump back to the index image.


While loading the next screen the old image is visible and you can see how it is overwritten with new image data.
This is intentional (you know HypraFap is doing something).
This first version has no double screen buffers etc.
Load happens directly into video ram section.

See here how the next image is faintly visible on the top half (a face in the middle):

![](img/2.jpg)

![](img/1.jpg)

## Swap Disk

If you have multiple disks with images, you can swap a disk out anytime while no drive access happens.

Press `R` to reload the directory of the new disk and access the images on it.

# Keyboard Commands

| key | command |
|---|---|
| `0`-`9`, `A`-`F`| Load image 0..15|
| `I` | Load first image / number 0 (index / gallery)|
| `Space` | next image |
| `R` | Reload directory after disk swap. Loads first image on new disk|


![](img/10.jpg)

# Making your own HypraFap disks

The shoe demo disk is not that exciting -- make your own disk!

## Image format

HypraFap uses standard uncompressed Koala Painter images produced by a lot of programs. I recommend Convertron 3000:

[https://github.com/fieserWolF/convertron3000](https://github.com/fieserWolF/convertron3000)

to convert `.jpg` / `.png` files to `.koa` files.

### Image aspect ratio

Note that the pixels are not perfectly square on a C64.

You get the best results when you compose your image in Photoshop or Gimp on a 320 x 214 pixel canvas and then reduce it to 160 x 200 pixels. After that blow it up again *without antialias* to 320 x 200. This then should be the version you put into Convertron 3000.

## Disk layout

To create your disk you can use tools like *cc1541*:

[https://csdb.dk/release/?id=230166](https://csdb.dk/release/?id=230166)

Under Ubuntu you can find this tool in the standard repo!

Write the content in the following order to the disk image:

1. HypraFap.prg (Download below)
2. Your index image (if any)
3. all other images

Download the latest HypraFap prg file here:
[https://github.com/pronopython/hyprafap/raw/main/hyprafap.prg](https://github.com/pronopython/hyprafap/raw/main/hyprafap.prg)

See how the Demo Disk looks like:

![](img/directory.png)

Images *need* to have the name ending in `.koa` for HypraFap to recognize them!

Add up to 16 Koala images per disk!

## Index image template

Index pages are just koala pictures like all the other pictures on the disks. An index images has to be the first image in the directory with the ending `.koa`.

You can use this template for your index image:


![](tools/index_template.png)

Note that this image is 160 x 200 and *after* you added all images you need to blow it up to 320 x 200 *without* antialias.

# Fast Loader compatibility

HypraFap works with Ultraload Plus. Download Ultraload Plus from csdb:

[https://csdb.dk/release/?id=60309](https://csdb.dk/release/?id=60309)

Load Ultraload Plus and start it. After that change the disk to HypraFap and load it as usual.

Images now load within 5 seconds!

# Compile HypraFap yourself

HypraFap was written for Turbo Macro Pro Cross Assembler ("TMPx"):

[https://turbo.style64.org/](https://turbo.style64.org/)

If you have the linux bin in the same directory (src) as the `.asm` files run:

`./tmpx -i hyprafap.asm -o hyprafap.prg`

to compile HypraFap.

# Know bugs & limitations

- "Loading" message is written to screen ram, color changes in the old image partially when load is started. Since the old image is overwritten, that is not that of a problem.
- Currently there is absolutly no error handling. If something is wrong with your disk or drive or filenames or whatever, HypraFap will just crash and you will probably see a frozen C64.
- Although there's this logo screenshot on top of this page, HypraFap comes without it. No one wants to wait 25 seconds for a logo. And it takes up 10 kB on disk ;-)

# Troubleshooting

| Problem | Solution |
|---------|---|
|It is slow!| Yes, the data transfer between disk drive and computer is 400 bytes (!) per second. A 10kB Koala image takes about 25 seconds to load. You can speed this up with a fastloader, see above.|


# Release Notes

## v0.1.0-alpha

- Initial Release

# Why?

For me this is just a weekend fun project to learn a bit 6502 assembly language on an 8 bit computer :-)
Binary file added hyprafap.prg
Binary file not shown.
Binary file added hyprafap_demo_disk.d64
Binary file not shown.
Binary file added img/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/directory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
166 changes: 166 additions & 0 deletions src/control.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
;----------------------------------------------------------------------------------------------
;
; HypraFap - Retro Fapping System
;
; For updates see git-repo at
; https://github.com/pronopython/hyprafap
;
;----------------------------------------------------------------------------------------------
;
; Copyright (C) PronoPython
;
; Contact me at pronopython@proton.me
;
; This program is free software: you can redistribute it and/or modify it
; under the terms of the GNU General Public License as published by the
; Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <https://www.gnu.org/licenses/>.
;
;----------------------------------------------------------------------------------------------
;
; Turbo Macro Pro cross assembler code for Commodore 64 / 6502 CPU
;

cycle_images

lda #$0
sta current_image

loop_cycle_image
lda current_image
jsr load_image_by_number
cycle_images_scan_key_loop

jsr scan_key

; == space ==

cmp #32 ; space key
beq keypress_space

; == 0-9 ==

cmp #48 ;0
bcs check_number
jmp cycle_images_scan_key_loop
check_number
cmp #58 ; ":" (one after "9")
bcc handle_number

; == a-f ==

cmp #65 ; A
bcs check_letter
jmp cycle_images_scan_key_loop

check_letter
cmp #71 ; "g" (one after "f")
bcc handle_letter

; == I ==

cmp #73 ; "I"
beq keypress_I

cmp #82 ; "R"
beq keypress_R

jmp cycle_images_scan_key_loop ; no supported keypress

; == handle calculated keys (0-9,a-f) ==
handle_number
sec
sbc #48
;sta current_image
jmp check_image_number_range

handle_letter
sec
sbc #55 ; 65 (letter A) - 55 = 10(th image)
jmp check_image_number_range

check_image_number_range
cmp number_of_images
bcs cycle_images_scan_key_loop
sta current_image
jmp loop_cycle_image

; == handle individual keys ==

keypress_space
inc current_image
jmp check_biggest_image_number

keypress_I
lda #0
sta current_image
jmp loop_cycle_image

keypress_R
jsr loaddir
lda #0
sta current_image
jmp loop_cycle_image
check_biggest_image_number
lda current_image
sec
sbc number_of_images
bne loop_cycle_image
lda #$0
sta current_image
jmp loop_cycle_image
rts

load_image_by_number
; A: image number (0..number of images - 1)
; uses $FB,$FC,$FD
sta $FD
jsr get_filename_pointer
lda $FD
jsr calculate_image_filename_length
ldx $FB
ldy $FC
jsr load_image
rts

calculate_image_filename_length
; A: image number (0..number of images - 1)
; returns: length in A
clc
rol
tay
iny
iny
lda image_name_pointers, y
clc
dey
dey
sec
sbc image_name_pointers, y
rts

get_filename_pointer
; A: image number (0..number of images - 1)
; returns: FB<, FC>
; uses $FB, $FC
clc
rol
tay
lda image_name_pointers, y
sta $FB
clc
iny
lda image_name_pointers, y
sta $FC
rts
Loading

0 comments on commit a0e5a62

Please sign in to comment.