Welcome, Guest. Please login or register.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - ssr86

Pages: [1] 2 3
Games / A few unfinished projects
« on: 2017.May.31. 12:10:53 »
Lately I can't find the time and motivation to program for the Enterprise... I'm somewhat embarassed that I couldn't finish anything for the devcompo. So here are some unfinished (and most probably never-to-be) projects that I've been working on during the last two years... If anyone is interested I could provide the source code but it's poorly commented and even can be messy at times... Maybe someone would be willing to continue...

Mr. Driller: https://www.youtube.com/watch?v=PxQYYNw-Y0s&t=1s
GamGit/Susur: https://www.youtube.com/watch?v=O7kJ6ZP7ymM
Stasis: https://www.youtube.com/watch?v=M6nsY-L8ZgM
Timberman bare prototype: https://www.youtube.com/watch?v=tZk6ALt4jHY
The Gladiators: https://www.youtube.com/watch?v=orqTacO3IUk

I also regret that I've never finished HatTrick as promised... It has many glitches, the last modification of the sound driver added a critical bug that hangs the game, no single player mode and music... Sorry...

Hardware / "Freezer" cart
« on: 2016.December.01. 18:07:35 »
How hard would it be to make a stripped-down freezer function cartridge (like final3, action replay for c64) that would allow saving game snapshots/screenshots onto a sd card?
(I mean as an upgrade to the sd card interface).

Programming / Dave music capabilities
« on: 2016.November.16. 14:06:50 »
As there are people more experienced with Dave sound generation and its capabilities I wanted to ask what are the possible channel use configurations.
The basic is use 3 channels as square or one of them for noise. You can enable some pokey-like distortion, a simple filter, ring modulation and that's about it.
But what if you use sound interrupts?
* one channel imitating pulse wave with or without pulse modulation. With lower sounds the interrupts won't be that frequent so this won't use that much cpu then, I think...
* use constant timer frequency (7812.5Hz fires once about every second raster line (?) so I don't know if getting higher than that would make it feasible to use for something more than a static screen...)
And you need to sacrifice one entire channel for the timer frequency - at least I couldn't get a good sound with one channel as timer and sound - too much of high frequency noise. However one could use the right and left amplitude control for different sounds so I guess you recover the lost channel somewhat with this... Then it's basicly (?) two 6bit sample-based instrument playback...
The DAC mode will sacrifice the entire left or right amplitude for sample playback (right?). And you still need the interrupts with a high frequency

Here's a link to the 1st part (of six) of maxymizer (an atari st chiptracker) https://www.youtube.com/watch?v=YjW8fn1n9YY (somewhat related I think).

Programming / Pulse Width Modulation on Dave
« on: 2016.November.06. 23:42:03 »
I've read that it's possible for the atari st sound chip to do a pulse wave + modulation via timer interrupts. So the same should be possible with Dave. I suppose that someone has already tried it. However I've experimented a little and got stuck...

It's quite easy to get a pulse wave with the sound interrupts. I'm using one channel and change the frequency at each interrupt to change the square wave into a pulse wave. One time the interrupt sets the channel amplitude to zero the other time it sets it to 63. The interrupt frequency codes A, B are such that A+B=2*base_sound_frequency_code. For A=B=bsfc we get the normal square wave.

When I introduce the modulation I have a few problems:
* the sound is not audible at every run of the program (via dave emulation I saw that I need to be setting the amplitude to zero when chn.state1==1 (dave.cpp of ep128emu), but I don't know if that's the case
* I can't play other channels - one of the sounds will not be audible or so it seems
* I can't use video interrupts for the modulation changes because the sound gets corrupted
(I want the modulation to run at 50Hz/16 for example)

Maybe someone can help to solve the problems or just say that it's no use with Dave capabilities...


Programming / How to do a proper soft-reset?
« on: 2016.July.08. 23:15:11 »
I've noticed another problem with my code this time it's something with the soft-reset.

The reset routine I'm using (copy-pasted from one of available examples):
Code: [Select]
        ld      sp,0100h
        ld      a,0ffh
        out     (0b2h),a
        ld      c,40h
        exos    0
        ld      a,01h
        out     (0b3h), a
        ld      a,06h
        jp      0c00dh
Installed with:
Code: [Select]
        ld      a,0ffh
        out     (0b2h),a ;system segment to page2
        ld      hl,resetRoutine
        ld      (0bff8h),hl ;store soft reset in EXOS segment

My problem is that in a wip that uses more than 64kb I need to reset the machine at least twice (do a hard-reset?) to make it to the boot screen (after a single reset the machine hangs). Another problem is about the sdcard - with all my wips - after a successful reset I need to manually change the current drive to :f: to autorun the file-explorer. However that is not the case with most of the other software. What am I doing wrong?
After reseting the machine in

Below is the code I'm using for my lpts in one of current projects. I switch them inside the interrupt.
My problem is that the first frame after the lpt switch is displayed one line late (or more that the first line is skipped and the display starts from the second line) and the next frame is displayed as should. This makes the display shake vertically.
What am I doing wrong?

I'm using charmode with all 288 display lines.

Seems that I'm being late with the lpt switch... but I don't think I had this problems with pixel mode displays...

Code: [Select]
; 160 x 144 4c with 2x2 pixels
current_charmap_address dw CHARMAP1_CPU_ADDRESS
current_font_address    dw FONT1_CPU_ADDRESS
dbuff_offset dw $0000
first_buffer_address  dw CHARMAP1_CPU_ADDRESS
second_buffer_address dw CHARMAP2_CPU_ADDRESS
first_font_address  dw FONT1_CPU_ADDRESS
second_font_address dw FONT2_CPU_ADDRESS

;;copy lptab data in the right place
        ld de,LPT1_CPU_ADDRESS
        ld hl,lptab_data
        ld bc,entab_data-lptab_data

        ; copy font
        ld hl,font_lvl1
        ld de,FONT1_CPU_ADDRESS
        ld bc,256*8

        ld hl,font_lvl1
        ld de,FONT2_CPU_ADDRESS
        ld bc,256*8

        ; copy charmap
        ld hl,charmap
        ld de,CHARMAP1_CPU_ADDRESS
        ld bc,40*144/8

        ld hl,charmap
        ld de,CHARMAP2_CPU_ADDRESS
        ld bc,40*144/8


        OUT (LPL),A        ;set up line parameter pointer
        ld a,(lpt_nick_start_addr+1)
        OUT (LPH),a        ;ensure LP counter is loaded (clk=0, load=0)
        OR  LPCLOCK        ;(clk=1)
        OUT (LPH),A
        OR  LPLOAD         ;(load=1)
        OUT (LPH),A        ;then let it run


        OUT (LPL),A        ;set up line parameter pointer
        ld a,(lpt_nick_start_addr+1)
        OUT (LPH),a        ;ensure LP counter is loaded (clk=0, load=0)
        OR  LPCLOCK        ;(clk=1)
        OUT (LPH),A
        OR  LPLOAD         ;(load=1)
        OUT (LPH),A        ;then let it run

screen1_nick_start_addr      dw $0000

screen_lpt equ 0000h



CHAR_MODELINE macro charline_number,font_addr,charmap
    line_number defl 0
        rept CHAR_HEIGHT
            db 256-1
            db CH256+C4
            db LEFT_MARGIN
            db RIGHT_MARGIN
            dw charmap+CHARS_PER_LINE*charline_number
            dw font_addr/256+line_number
            db COLOR00, COLOR01, COLOR02, COLOR03, COLOR04, COLOR05, COLOR06, COLOR07

            db 256-1
            db CH256+C4
            db LEFT_MARGIN
            db RIGHT_MARGIN
            dw charmap+CHARS_PER_LINE*charline_number
            dw font_addr/256+line_number
            db COLOR00a, COLOR01a, COLOR02a, COLOR03a, COLOR04a, COLOR05a, COLOR06a, COLOR07a
            line_number defl line_number+1



charline_number defl 0
     CHAR_MODELINE charline_number,font1_addr,charmap1_addr
     charline_number defl charline_number+1

;; sync block:

;; size of bottom border [3 lines]
    db 256-3,18,63,0,0,0,0,0,0,0,0,0,0,0,0,0

;; sync on [4 lines]
    db 256-4,16,6,63,0,0,0,0,0,0,0,0,0,0,0,0

;; sync off at half line [1 line]
    db 256-1,16,63,32,0,0,0,0,0,0,0,0,0,0,0,0

;; blank [4 lines]
    db 256-4,18+VINT,6,63,0,0,0,0,0,0,0,0,0,0,0,0

;; size of top border [12 lines]
db 256-12,19,63,0,0,0,0,0,0,0,0,0,0,0,0,0


charline_number defl 0
     CHAR_MODELINE charline_number,font2_addr,charmap2_addr
     charline_number defl charline_number+1

;; sync block:

;; size of bottom border [3 lines]
    db 256-3,18,63,0,0,0,0,0,0,0,0,0,0,0,0,0

;; sync on [4 lines]
    db 256-4,16,6,63,0,0,0,0,0,0,0,0,0,0,0,0

;; sync off at half line [1 line]
    db 256-1,16,63,32,0,0,0,0,0,0,0,0,0,0,0,0

;; blank [4 lines]
db 256-4,18+VINT,6,63,0,0,0,0,0,0,0,0,0,0,0,0

;; size of top border [12 lines]
db 256-12,19,63,0,0,0,0,0,0,0,0,0,0,0,0,0

entab_data equ $

Games / Total recall gfx and sound problems
« on: 2016.June.25. 00:13:46 »
Is there some other version of the total recall speccy port game? The one on the sd card disc image has problems with sound ("glitching" sometimes when punching for example) and there's something wrong with the scrolling - like the color attributes aren't synchronized with the graphics... I don't remember there being these problems on the speccy (at least with emulation).

Team Hat Trick aka Six Men One Puck a clone/rip-off of Hat Trick by Bally Sente.
Graphics are based on the ms-dos version but altered. Come to think of it I don't know if this counts as a conversion or an original program...

It was made with 64kb 50fps in mind but I've failed... You won't be able to play with all the players on 64kb machine in 50fps... The game slow downs constantly. Maybe there's a chance for optimization but I don't know if memory will allow it... I think ep128 could get a special optimized version which maybe even could do Eight Men One Puck:) but that maybe some other time...

However as soon as you run it you'll see that the game is still not finished. There's no sound and I've encountered some bugs which I'll try to fix. Also the title screen is very minimal... No single player mode...

EDIT: Added a quick manual text file to the attachements.

- in shootout, when starting from gate the left player can turn down and he doesn't bounce from the rink bounds thus allowing him to shoot the puck outside the rink... However the shootout turns are short so that shouldn't be too game breaking...
- there is some random bug/glitch when shooting diagonally towards the right rink bound...
- irritating clinching... it's hard to free yourself

Some unimplemented but planned features:
- endurance and strength settings
- tournament mode (?)
- auto-facing the goal (like on c64 version of ht) option
- enhanced control of the goalkeeper if assigned a seperate controller (more control over the puck)
- computer player...
- saving of settings/presets

Hope some of you have someone to play with and you will enjoy it...

A quick video presentation:

New video:

Games / A zelda-game clone in 64x64
« on: 2016.May.11. 10:42:43 »
Legend of Xenia - a Legend of Zelda clone that plays in a 64x64 resolution and seems that the looks and overall should be feasible on the ep in 256color pixel mode or 16c lpixel mode. Just to show what could be done in the "very-blocky" modes of the ep.


Programming / How to do a CPC conversion?
« on: 2016.April.29. 08:11:18 »
This question seems to be addressed to Geco and Istvan as they are the only ones here (?) that have done any such conversions... Could you describe the process of converting a CPC game without having its source code? I guess it depends very much on the ported game itself but maybe some general basics - how to start guide?

Programming / Distortion guitar sound in basic
« on: 2016.February.21. 14:31:49 »
Could someone explain how to get the right harmonics for chords (fifths and fourths) in basic for the guitar sound?
Guessing+trial and error doesn't go very well...

For smoke on the water the four 4ths used are (through trial and error): 58-63, 61-66.1, 63-68, 63.9-68.7

Is there an equation for the correct values?

Programming / Gameboy-like 160x144 4c mode
« on: 2016.February.18. 12:37:28 »
Just a proposition or recommendation of sorts...
Recently I've came across the gameboyJam site:
...and also have a look at the real gameboy games...

The 160x144 4color graphic mode has a real charm... at least for me.
...and the ep is capable of it.
You can have 160x144 4color with LPIXEL or CHAR modes.
A single screen buffer takes $1680 bytes when no scrolling. That's not much so you could preapre a clean buffer for speeding up the erasing of sprites. Could be quite fast. Don't know about using char mode but it is a possibility.
The downsides are that although you have wide pixels, the scroll would be in 4 pixel chunks... not very elegant. Also you would need more shifted sprites. Most TVs won't display some of the vertical lines so the hud may not be visible.
And with the nick's rich 256 color palette one could find some good 4-color themes.

Any other pros/cons?

PS: look at the game http://jams.gamejolt.io/gbjam3/games/stasis/31945 - this is a simple game that's certainly possible on the ep. Or look at the classic tetris for gb or maybe the duffy duck martian missions.

Games / WIP: KidTrippEp
« on: 2015.December.16. 21:08:59 »
Well meant more as a platformer "engine" (or more a "foundation" - getting a tile-based screen with sprites to work and implement tile-sprite collision) not to be kidtripp in the end but for now it's that I guess...
Don't mind all the issues with the player sprite (being drawn upside-down, dissaperaing during scrolling and some unwanted transparency)... I just wanted to make the scrolling of a tilebased screen work... So that's what you can do in the attached file - scroll through the first level of KidTripp. However as you see - a KidTripp port would need to have also partial vertical scrolling (half a screen up) because the screen should be taller... And that creates some problems with the memory and width of the visible screen...

At the moment I don't have plans to "finish" it for the competition... But will see how it goes (most of the things done here and those that are still to do are a "first" for me)... As the kidtripp I won't do more than one level I think...
Maybe when the "engine" would be in some more complete condition, some level-designer and graphician would pop up? However that's too far fetched for now I guess...

Programming / Pixel modes screen scroling
« on: 2015.November.19. 18:59:14 »
I have never done in-game scrolling and so I have some questions for those who have some experience with it.

There's no screen memory wrap like on the cpc so I guess you can't use the "adaptive tile refresh" technique and can't use other techniques from the cpc?...
What's the minimal back-buffer for horizontal scrolling if I don't want to do software scrolling with a tile-based screen? I think that I would need nearly 2 screens width for the video buffer...And that's rather unfortunate... How should I go about doing it?

The question is somewhat related to the "tripbuffer techdemo" (https://enterpriseforever.com/programming/video-config-that-allows-to-draw-sprites-vertically/) where I wanted to have 3 video buffers - two screen for double buffer and an additional clean buffer for erasing... However it seems that if I want to do scrolling I would need to drop the third buffer then I would have a 128-bytes wide lines.. and that's still 32 bytes less than 2 screens... No good (if I want to follow the vertical-stripes based drawing for optimization...)

Programming / Do you know Git? If not, you should ;)
« on: 2015.November.17. 17:56:24 »
[I'm writing this mainly because of the devCompo...]

I think that many of you are programmers by profession and so you know git and what a great tool it is. However there may be people here not familiar with version control and how it simplifies the way you try/implement changes to your projects. And you can document all your changes/development steps through your commit messages and read the story through git log ;). And it seems you can always undo if you mess up.

I first got to learn and use git about half a year ago and now I can't imagine coding without it ;P. It's the greatest tool I have ever came to use. So powerful...

Here's a link to an interactive git course at codecademy:
Note that the last part is obsolete for individual projects.
However they don't mention a few commands which (at least myself) use very often:
git checkout -b
git stash (git stash apply/drop/list/pop)
git rebase (they base the course on git merge which I try to avoid :oops: because I feel I could mess up and have to repair)
git reflog (well I mess up sometimes...because maybe I stash too often ;P)
There should be many other interactive couses, but the one at codecademy is the only one I've tries...:

Pages: [1] 2 3