News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Devilmarkus

JavaCPC Desktop 1.0 official release

Started by Devilmarkus, 11:05, 14 August 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devilmarkus

JavaCPC update to v2.9.4 is available now on Sourceforge.

Update from v2.9.3 to v2.9.4 changelog:

- Fixed the raster code for RasterPaint. Old code caused bad behavior in FDC and PPI ports.

- Reimplemented port-behavior problems for FDC emulation. (I once disabled them, for internal testings)

- RasterPaint: Function added to export the raster screens directly as executable binaries.
- RasterPaint: Raster table and screen pixeldata are simply crunched now (When export binaries)
- Removed "New CPC / Old CPC" setting. For CPC Plus / New CPC you need the source file. By default it renders for old CPC.
- Added: RasterScreen.asm for developers (To assemble for New generation CPCs, too)

Download here: http://sourceforge.net/projects/javacpc/
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

roudoudou

Quote from: Devilmarkus on 23:37, 26 May 16
Ok, first screen was taken f rom Caprice32, 2nd from WinApe...

But, trust me, the first moment I thought "WTF? ??? ??? ??? "


I thought latest versions of Winape where accurate for splitrasters...

Devilmarkus

Quote from: roudoudou on 17:49, 30 May 16

I thought latest versions of Winape where accurate for splitrasters...

Seems, not for OUTI?!?

WinApe rasters 8 pixels too late here. (Or too early, depends how you see it)
We made several tests with my raster routine. JavaCPC and real CPC, CRTC 1, shows it properly...

When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

TFM

Great achievement Markus! You are one of the few who actually do something for our lovely CPC.  :) Hope that somebody has the time to add the new screens to games and upload them.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

mr_lou

Looking forward to see some awesome raster MODE 1 title screens for future games!  :)

Morn

Why is JavaCPC offering an "upgrade" from 2.9.21 to 2.9.4 today? That sounds like a downgrade to me. Or am I missing something about version numbers here?  ???

Dagger

No, 2.9.4 is higher than 2.9.21. Look it as 2.9.40
Life's a bitch. You marry one or two then you die !

Devilmarkus

#332
2.9.21 is like I just changed 1-2 lines of code between 2.9.2 and 2.9.21 (No big deal here)

I dont post every update here. Too lazy ;)

Edit: Also the version numbers 2.9.x I used to troll Greatxerox, as he is still waiting for v3.0 :P :laugh: 8)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Morn

Quote from: Devilmarkus on 11:38, 04 June 16
2.9.21 is like I just changed 1-2 lines of code between 2.9.2 and 2.9.21 (No big deal here)
2.9.2-1 might have been better then. Or maybe 2.9.2b. But I guess if the updater app is happy with it, I won't nitpick too much. It just looked a bit strange.  ;D

Devilmarkus

The updater is happy with every number. It's just comparing your existing version with the latest on server... So I could release the next version as 0.0001 or so ;)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

arnoldemu

I ran some tests but I went back to the simplified test.

I tested on my 6128 type 0, 6128 type 1, 6128 type 2, GX4000 and 464Plus in these tests.

TODO: 664, 464 type 4, 464 type 0, KC Compact.

Attached is the code with comments. It's the raster split code with a hard coded table, letters along the top.

Warning all tests done on aging CM14. I didn't change the code for Plus/CPC. I left it for CPC. I did test in mode 1 and 2.

Noticeably colour changes are happening on pixel boundaries and do not correlate exactly with us cycles.

Sorry no photos. You need to run it on a real cpc to compare or perhaps JavaCPC.


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Devilmarkus

Nice work!

Could you adapt my latest raster routine to your test, too, please? ;)

        ;-----------------------------------------
        ;    JavaCPC RasterPaint Assembly code
        ; Authors: Oliver M. Lenz, Markus Hohmann
        ;-----------------------------------------

        org    &2000  ; CALL &2000

        OldCPC EQU 1 ; Set this to 0 for CPC Plus / Newer CPC Models.


doRaster:
        di
        im        1
        ei

newframe:
        ld        HL,(&0038)
        ld        (rstsave),HL
        ld        HL,&C9FB
        ld        (&0038),HL

        ld        B,&F5
.waitvsync
        in        A,(C)
        rra
        jp        nc,waitvsync


        halt
        halt

        di
        ld        DE,&1702
.waitforstart
        dec        D
        jr        nz,waitforstart
        dec        E
        jr        nz,waitforstart

        nop
        IF        OldCPC
        nop
        ENDIF

        ld        BC,&8080
        out        (C),C  ; select pen 1
        ld        HL,TableData
        ld        DE,&0203
        ld        A,&01

.nextline
repeat 200
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        ;        40

        out        (C),D  ; 4 ; pen 2
        ld        B,C  ; 1
        outi        ; 5
        out        (C),E  ; 4 ; pen 3
        outi        ; 5
        out        (C),A  ; 4 ; pen 1
        ld        B,C  ; 1
        ;        --
        ;        64 microseconds
rend

        ld        HL,(rstsave)
        ld        (&0038),HL
        ei

        LD        A,&45 ; from &40 to &49 with bdir/bc1=01
        LD        D,0
        LD        BC,&F782 ; PPI port A out /C out
        OUT        (C),C
        LD        BC,&F40E ; Select Ay reg 14 on ppi port A
        OUT        (C),C
        LD        BC,&F6C0 ; This value is an AY index (R14)
        OUT        (C),C
        OUT        (C),D ; Validate!! out (c),0
        LD        BC,&F792 ; PPI port A in/C out
        OUT        (C),C
        DEC        B
        OUT        (C),A ; Send KbdLine on reg 14 AY through ppi port A
        LD        B,&F4 ; Read ppi port A
        IN        A,(C) ; e.g. AY R14 (AY port A)
        LD        BC,&F782 ; PPI port A out / C out
        OUT        (C),C
        DEC        B ; Reset PPI Write
        OUT        (C),D ; out (c),0
        bit        7,A
        jp        nz,newframe
        ret

.rstsave
        db        0,0

TableData:
repeat 200
defb &40,&43,&4b,&4a,&4c,&50,&52,&59,&5a,&48
rend
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

arnoldemu

#337

Quote from: Devilmarkus on 15:32, 04 June 16
Nice work!

Could you adapt my latest raster routine to your test, too, please? ;)

Will do. Just tried the previous code on my 464 type 0 with Vortex ram expansion and the colours are going crazy! They are not even still. The pattern is almost like a 1960's wallpaper!
Ouch!

EDIT: New code is working :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Devilmarkus

New code should not corrupt PPI / FDC and other shared ports anymore... ;)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

arnoldemu

#339
Quote from: Devilmarkus on 16:17, 04 June 16
New code should not corrupt PPI / FDC and other shared ports anymore... ;)
I set OldCPC to 0 to match same timings as previous test.

results:
464 type 0, vortex ram expansion, not sure which GA. Same as 6128 for mode 1 and mode 2.
EDIT: Confirming: mode 1: grey split mid #, yellow/red mid 2.

464 type 4, same border position as plus. But colour changes are different for mode 2. The colours are absolutely perfect on the microsecond. On Plus there is a 1 pixel line of mode 2 on the ( but not on 464 type 4. It's a mode 2 pixel later it seems.

Mode 1 (new code): grey split mid $, just before vertical of $ character. Yellow to red is mid 3. 1 pixel after middle horizontal "line" of 3.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

kc compact. Screen is 1 char to the left same as plus and type 4.

mode 1 same as cpc6128.

grey split ends mid #, closer to 2nd vertical of #. yellow to red mid 2.

mode 2:

now this is interesting.

I connect my kc compact to the cm14 via a scart cable and there is some ghosting and the image is a bit blurred BUT I think this really does happen:

at the point of colour change the kc compact repeats the last pixel.
For yellow to red transition, D is yellow, E is red. But last pixel line of D repeats. So it is a bit fatter.

On the grey, the split has grey & and yellow ', and again here 1 pixel line repeats.

So... mode 2 split rasters is fun.

(Talking about kc compact and split rasters: if you change the border colour, you get one pixel of black I think where the transition happens!)

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

summary of my machines:

- kc compact, 6128's with 40010 and 464 with 40007 (not opened to see yet) are all the same or at least are the same on my monitor.

- 464 plus, gx4000 and 464 type 4 are the same or at least I can't see easily with my monitor for mode 1

- differences in mode 2 colour changes that I think can't be corrected by 1 NOP adding or removing.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Devilmarkus

Could you take some photos, too, please?
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

arnoldemu

Quote from: Devilmarkus on 17:30, 04 June 16
Could you take some photos, too, please?
yes I will do.

The battery had run out on the camera. :(
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Devilmarkus

#344
Changed your code a bit:

        ;;        I did not use CPCPlus equ 1

        ;;        MODE 2 results

        ;;        GX4000:
        ;;        white, pastel yellow,bright white, bright yellow, bright red, blue, green, sea green
        ;;        border is pastel yellow.
        ;;        Text is  !"#$% etc
        ;;        Grey extends up to but not including last pixel of "(" (i.e. there are two dots which are the final
        ;;        pixel graphics of the bracket.). The dots are pastel yellow.and are a single mode 2 pixel in size.
        ;;
        ;;        464 Plus: same as GX4000
        ;;
        ;;        6128 type 2 CRTC. believed 40010. Edge connectors
        ;;        border shifted compared to Plus. by 1 CRTC char
        ;;        grey split not so obvious, bright yellow split shows two dots from first pixel of E. Remainder of E is bright red.
        ;;
        ;;        6128 type 1 CRTC. believed 40010. Has German connectors.
        ;;        Seems same as type 2, but less obvious probably because of ghosting on my monitor.
        ;;
        ;;        6128 type 0 CRTC. believed 40010. Edge connectors
        ;;        same as type 2.
        ;;
        ;;        MODE 1 results:

        ;;        GX4000
        ;;        split is start of $ symbol. First mode 1 pixels of the graphics are grey, rest
        ;;        is pastel yellow
        ;;        red to blue happens ~2 mode 1 pixels into the 8
        ;;
        ;;        yellow to red happens 2 pixels into the 3

        ;;        6128 type 2 CRTC
        ;;        same as type 0

        ;;        6128 type 1 CRTC.
        ;;        same as type 0, 2 seems to be 3 mode 1 pixels in. (strangely with my dodgy screen
        ;;        this is the only one where there is flicker at the grey and pale yellow transition and
        ;;        bright green and pastel green. No idea why).
        ;;
        ;;        6128 type 0 CRTC.
        ;;        grey split mid #, bright yellow split mid 2, bright white split mid -.
        ;;


        ;-----------------------------------------
        ;        JavaCPC RasterPaint Assembly code
        ;        Authors: Oliver M. Lenz, Markus Hohmann
        ;-----------------------------------------

        org        &8000  ; CALL &8000

        OldCPC        EQU 1 ; Set this to 0 for CPC Plus / Newer CPC Models.
        MODE2        EQU 1
start:

        ld        a,1 ;; MODE 1!
        if        MODE2
        ld        a,2 ;; MODE 2!
        endif
        call        &bc0e

        ld        hl,&c000
        ld        e,l
        ld        d,h
        inc        de
        ;;ld        (hl),&ff
        ld        (hl),%11110000
        if        MODE2
        ld        (hl),&ff
        endif
        ld        bc,&3fff
        ldir

        ;;ld        b,80
        ld        b,40
        if        MODE2
        ld        b,80
        endif
        ld        a,' '
s1:
        push        bc
        push        af
        call        &bb5a
        pop        af
        inc        a
        cp        127
        jr        nz,s2
        ld        a,' '
s2:
        pop        bc
        djnz        s1

        di
        im        1
        ei
        ld        bc,&7f10
        out        (c),c
        ld        bc,&7f43
        out        (c),c

newframe:
        ld        HL,(&0038)
        ld        (rstsave),HL
        ld        HL,&C9FB
        ld        (&0038),HL

        ld        B,&F5
waitvsync:
        in        A,(C)
        rra
        jp        nc,waitvsync


        halt
        halt

        di
        ld        DE,&1702
waitforstart:
        dec        D
        jr        nz,waitforstart
        dec        E
        jr        nz,waitforstart

        nop
        IF        OldCPC
        nop
        ENDIF

        ld        BC,&8080
        out        (C),C        ; select pen 1
        ld        HL,colours
        ld        DE,&0203
        ld        A,&01

.nextline
        rept 200
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        outi        ; 5
        ;        40

        out        (C),D  ; 4 ; pen 2
        ld        B,C  ; 1
        outi        ; 5
        out        (C),E  ; 4 ; pen 3
        outi        ; 5
        out        (C),A  ; 4 ; pen 1
        ld        B,C  ; 1
        ;        --
        ;        64 microseconds
endm

        ld        HL,(rstsave)
        ld        (&0038),HL
        ei

        LD        A,&45 ; from &40 to &49 with bdir/bc1=01
        LD        D,0
        LD        BC,&F782 ; PPI port A out /C out
        OUT        (C),C
        LD        BC,&F40E ; Select Ay reg 14 on ppi port A
        OUT        (C),C
        LD        BC,&F6C0 ; This value is an AY index (R14)
        OUT        (C),C
        OUT        (C),D ; Validate!! out (c),0
        LD        BC,&F792 ; PPI port A in/C out
        OUT        (C),C
        DEC        B
        OUT        (C),A ; Send KbdLine on reg 14 AY through ppi port A
        LD        B,&F4 ; Read ppi port A
        IN        A,(C) ; e.g. AY R14 (AY port A)
        LD        BC,&F782 ; PPI port A out / C out
        OUT        (C),C
        DEC        B ; Reset PPI Write
        OUT        (C),D ; out (c),0
        bit        7,A
        jp        nz,newframe
        ret

rstsave:
        db        0,0

colours:
        rept 200
        defb        &40,&43,&4b,&4a,&4c,&50,&52,&59,&5a,&48
endm

        end start


(JavaCPC users please replace REPT and ENDM to REPEAT and REND)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Axys

Very good work Devilmarkus.  :)

I use JavaCPC with Ubuntu 16.04 and I have some problems / requests.

The main problem is the keyboard. I use a french keyboard. In the emulator letters are good. But all others characters are bad.
Numeric keys are mapped to Fx keys (F1, F2, ...).
It's impossible to do most of special characters (", #, ...).

Minor bugs:
when closing GFXViewer (click on cross), JavaCPC Desktop is closed (no error in the terminal).
Manage DSK can't open DSK created with JavaCPC (Disk not directoryable / readable).

Request:
Is it possible to add a directive in assembler: incbin ?

Thx

Devilmarkus

#346
Quote from: Axys on 17:30, 01 July 16
The main problem is the keyboard. I use a french keyboard. In the emulator letters are good. But all others characters are bad.
Numeric keys are mapped to Fx keys (F1, F2, ...).
It's impossible to do most of special characters (", #, ...).

This should work ok, as I implemented French keyboard translation, too. (Developed under Windows)
If not, I can't help you here, sorry.

Quote from: Axys on 17:30, 01 July 16
Minor bugs:
when closing GFXViewer (click on cross), JavaCPC Desktop is closed (no error in the terminal).

Fixed that.

Quote from: Axys on 17:30, 01 July 16
Manage DSK can't open DSK created with JavaCPC (Disk not directoryable / readable).

ManageDSK doesn't work under Linux / Mac OS. It makes use of CPCXFS.exe which only runs under windows.

Quote from: Axys on 17:30, 01 July 16
Request:
Is it possible to add a directive in assembler: incbin ?


JavaCPC update 2.9.5b is out. (b because I now just read about your request about the GFXViewer problem)
Fixes so far:
- Fixed INCBIN instruction in assembler.
- Improved assembler speed up to 300% (Especially when using disassembled code)

New features:
- Assembler understands command "define" e.g.:
define .myfile = "MYFILE.BIN"
INCBIN .myfile

this works with INCBIN, INCLUDE and READ (READ is similar to INCLUDE)
When you use INCBIN / INCLUDE / READ instructions, make sure, the additional files are in the same folder than your assembly code.

- Assembler: added IFDEF check (Like in Winape)
IFDEF does not check the value given to a label, just checks if this label has been defined.
Syntax:
ifdef mylabel
<asm code here>
else
<asm code there>
endif

- Fixed LD IXH,x and related instructions

Updates:
- Embedded JavaGX4000 emulator has been updated.
- RasterPaint is improved. You can now select every single zone/line to disable autogeneration for palette. (last palette is used then)
This is VERY useful to remove some unwanted stripes.
Use right mouse button into preview window:
1x clicked: rastermode 1: zones are selectable. (You can see them) Click one to toggle as active (default) or inactive
2x clicked: rastermode 2: lines are selectable. Click them to toggle, too
3x clicked: rastermode 3: zones AND lines are visible and toggle on click
You need to play around with that. But it really can improve the result.
- RasterPaint: Image can be opened in a 3x zoomed frame. It has the same rastermodes to select zones and lines like the main window. Makes it easier to find / hit the correct zones.
- RasterPaint: Image, which is vertically higher than 320x200 pixel ratio can be scrolled up/down now.
- An emulator has been added :P (You can only use it with a special cheat command from console...) (Hint: It's not a toaster but may have to do with bread)

Many more things fixed, which I forgot now to list were made, too.
And, as usual: Many new bugs added for your pleasure ;)

Grab your update as usual here:
http://sourceforge.net/projects/javacpc
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Devilmarkus

Seems that SF has some trouble today.
When you let JavaCPC check for updates, it will give you the latest copy, too...
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

GUNHED

Update works! A GEM and a CHARM like always!

http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod