Author Topic: 8BP  (Read 9554 times)

0 Members and 1 Guest are viewing this topic.

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
8BP
« on: 12:07, 27 September 16 »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: 8BP
« Reply #1 on: 19:36, 27 September 16 »
Great work done!  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
Re: 8BP
« Reply #2 on: 01:27, 02 November 16 »
hi 8bp friends


new game "nibiru" available at https://github.com/jjaranda13/8BP made in BASIC, using 8BP v26b


info at http://8bitsdepoder.blogspot.com.es/

video at https://github.com/jjaranda13/8BP
« Last Edit: 01:32, 02 November 16 by jjaranda13 »

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.293
  • Country: au
    • index.php?action=treasury
  • Liked: 948
  • Likes Given: 1053
Re: 8BP
« Reply #3 on: 02:09, 02 November 16 »
That's very, very impressive.
The scrolling in nibiru is excellent, considering that the whole screen(!) is being used.

My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494

Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 1.106
  • Country: gr
    • Parts from the past.
  • Liked: 582
  • Likes Given: 1570
Re: 8BP
« Reply #4 on: 16:31, 02 November 16 »
This is just amazing!

Offline Morri

  • CPC6128
  • ****
  • Posts: 284
  • Country: nz
  • Liked: 236
  • Likes Given: 215
Re: 8BP
« Reply #5 on: 20:02, 02 November 16 »
Well done @jjaranda13 , looking good!
I am starting to get the game making bug again and have a few ideas and would love to use 8bp to do it.

Request: The sprite flip ability you have in your to do list would be very useful  :D
Keeping it Kiwi since 1977

Offline Javy Fernandez

  • CPC464
  • **
  • Posts: 46
  • Country: es
  • www.defectodigital.com
  • Liked: 82
  • Likes Given: 28
Re: 8BP
« Reply #6 on: 23:43, 02 November 16 »
The 8BP library is amazing!

Offline Dizrythmia

  • CPC6128
  • ****
  • Posts: 208
  • Country: au
    • Retrospekt
  • Liked: 99
  • Likes Given: 56
Re: 8BP
« Reply #7 on: 06:12, 04 November 16 »
I was playing Parodius on the PC Engine yesterday, & this is easily comparable!

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
Re: 8BP
« Reply #8 on: 13:59, 23 December 16 »
new available game: mini-pong ( a simple version of classic "pong")
it is quite simple, and suitable as introduction for begginers in 8BP.  The BASIC program is very short and understandable
i have the intention ti create some "short games" for help others to make their own games
« Last Edit: 14:02, 23 December 16 by jjaranda13 »

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.710
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 950
  • Likes Given: 1664
Re: 8BP
« Reply #9 on: 23:41, 23 December 16 »
This could be quite handy for anyone coding with CPC BASIC 3. Have you tried anything out between your library and CPC BASIC 3? It should produce some interesting results.  :D
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline cpcuser

  • CPC664
  • ***
  • Posts: 73
  • Country: de
  • Liked: 15
  • Likes Given: 0
Re: 8BP
« Reply #10 on: 00:01, 24 December 16 »

Ccz80 ++ is more and faster with the sprite and the other bases.


Greeting

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.710
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 950
  • Likes Given: 1664
Re: 8BP
« Reply #11 on: 00:20, 24 December 16 »
Ccz80 ++ is more and faster with the sprite and the other bases.


Greeting

Which is why I think CPC BASIC 3 combined with 8BP will produce an interesting result
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
Re: 8BP
« Reply #12 on: 21:53, 30 December 16 »
It could be interesting to take a basic program which uses 8BP and compile it using BASIC3. I will test it

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
Re: 8BP
« Reply #13 on: 22:00, 30 December 16 »
.
« Last Edit: 22:03, 30 December 16 by jjaranda13 »

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
Re: 8BP
« Reply #14 on: 22:03, 30 December 16 »
new available game: mini-invaders ( a simple version of classic "space invaders").it is quite simple, and suitable as introduction for begginers in 8BP.  The BASIC program is very short and understandable for beginners


https://www.youtube.com/watch?v=6OcB_hjuYiU
« Last Edit: 22:07, 30 December 16 by jjaranda13 »

Offline sigh

  • 6128 Plus
  • ******
  • Posts: 1.126
  • Liked: 431
  • Likes Given: 41
Re: 8BP
« Reply #15 on: 17:47, 02 January 17 »
Very impressive examples. Especially "Nibiru".

I reckon that with the stars in the background, could it work by using palette swaps to make it smoother?
andycadley suggested this idea for the scrolling of the white lines on my football game.

It's bascially having 2 pixels - 1 white and the other black next to each other, then swapping the colours around while you scroll it. It gives a very smooth feeling of scrolling.
« Last Edit: 17:52, 02 January 17 by sigh »

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
Re: 8BP
« Reply #16 on: 22:05, 02 January 17 »
Very impressive examples. Especially "Nibiru".

I reckon that with the stars in the background, could it work by using palette swaps to make it smoother?
andycadley suggested this idea for the scrolling of the white lines on my football game.

It's bascially having 2 pixels - 1 white and the other black next to each other, then swapping the colours around while you scroll it. It gives a very smooth feeling of scrolling.


Hi Sigh


Thanks,  It is possible to create animation effects using inks. In fact 8BP provides the command |RINK to create "rotation ink" animation effects, such as the road effect or the scroll of bricks effect which is shown in  this video: 
https://youtu.be/LYkxSuNfYeI   (check at second 1:05)

The same "trick" can be used for scroll of stars. However, in "Nibiru" and "mini-invaders", the stars effect is created using the command |STARS, which can provide up to 40 stars in movement at different planes of speed. For example in "Anunnaki" the initial screen uses |STARS command to create a depth effect (video at
https://www.youtube.com/watch?v=8x2g_t4-lCU)
« Last Edit: 22:11, 02 January 17 by jjaranda13 »

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
Re: 8BP
« Reply #17 on: 15:44, 03 January 17 »
i have tested CPC BASIC Compiler using 8BP
concretely, i have compiled mini-invaders
my conclusions:
- around 50% faster
- difficult to debug (it is machine code)
- no 100% compatible with locomotive basic
- useful for programmers which want more speed or hide their code



https://www.youtube.com/watch?v=0ifIjdjgkEc




Offline SRS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 559
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 546
  • Likes Given: 286
Re: 8BP
« Reply #18 on: 23:01, 03 January 17 »
Does it compile with FaBaCom, too ?

People could develop and test/debug with normal 8BP/Basic and deliver the final work compiled.

Offline jjaranda13

  • Dev
  • CPC464
  • *****
  • Posts: 30
  • Country: es
    • 8BP (8 bits de poder)
  • Liked: 86
  • Likes Given: 7
Re: 8BP
« Reply #19 on: 23:28, 03 January 17 »
Does it compile with FaBaCom, too ?

People could develop and test/debug with normal 8BP/Basic and deliver the final work compiled.


Yes, the problem with fabacom is the RAM usage. A BASIC game that consumes 10KB, after compiling with fabacom takes 20KB. In fact, CPC Basic compiler takes also certain overload. I have compiler nibiru (17KB) and the compiled version takes 22KB (5KB extra).


I believe that although fabacom and CPC BASIC compiler are good friends....they have advantages and disadvantages (extra RAM usage, not 100% compatibility...) and for the moment i prefer locomotive BASIC, because the speed with 8BP is enough for most games.


When there is needed an extra speed...we can :
- eliminate all REM instructions from logic <-- always it is a good practice !
- replace RSX commands by CALL XXXX  <--- less understandable code but faster!


These two recommendations provide an extra speed, and only if you need more speed , the compilation is justified, because takes more RAM and have compatibility problems. For example, in mini-invaders, the sound command doesnt work properly in the compiled version




« Last Edit: 10:33, 04 January 17 by jjaranda13 »

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.710
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 950
  • Likes Given: 1664
Re: 8BP
« Reply #20 on: 00:28, 04 January 17 »
i have tested CPC BASIC Compiler using 8BP
concretely, i have compiled mini-invaders
my conclusions:
- around 50% faster
- difficult to debug (it is machine code)
- no 100% compatible with locomotive basic
- useful for programmers which want more speed or hide their code


Yeah unfortunately after suggesting CPC BASIC 3, I recalled there being some differences with Locomotive BASIC and CPC BASIC 3. Subtracting of numbers and making sure they don't become negative is one of the main differences. CPC BASIC 3 the default type is Integer or Byte (I cannot remember which) & decimal numbers operate through a series of RSXs. INT becomes invalid and MOD is used instead. I think the trick to subtracting was to add instead, so depending on what subtracting by, you can add &FFFF decrementing those amounts.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.710
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 950
  • Likes Given: 1664
Re: 8BP
« Reply #21 on: 00:40, 04 January 17 »
Does it compile with FaBaCom, too ?

People could develop and test/debug with normal 8BP/Basic and deliver the final work compiled.

Sadly yes, once you start using the CPC Compilers space becomes a concern, which was why I raised it's use with CPC BASIC 3. I'm unsure if it's still being developed to make it more compatible with Locomotive BASIC, but that may have some setbacks in terms of the Assembly code generated. Some people have said here that the code produced from the CPC BASIC 3 is quite difficult to optimize.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.710
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 950
  • Likes Given: 1664
Re: 8BP
« Reply #22 on: 01:17, 04 January 17 »

Yes, the problem with fabacom is the RAM usage. A BASIC game that consumes 10KB, after compiling with fabacom takes 20KB. In fact, CPC Basic compiler takes also certain overload. I have compiler nibiru (17KB) and the compiled version takes 22KB (5KB extra).


Unsure if you're referring to the generated .ASM file or the final BINary program. A compiled program will always be larger than its Interpreted counterpart as a fully compiled program must be present for execution, the Interpreted counterpart is tokenized which can condense the size of the program, but what's interesting in your case is RSXs aren't tokenized.

Quote
When there is needed an extra speed...we can :
- eliminate all REM instructions from logic <-- always is a good practice !
- change RSX commands by CALL XXXX  <--- less understandable code but faster!


Unlike RSXs, using CALL will be tokenized and from BASIC what you can do is setup some variables and assign some addresses to them for those routines, the RSX could be removed to create some more space and it may even improve the performance of your BASIC programs. So if you assign meaningful names like stars%=&xxxx and so on and just use CALL stars%, it should be clear enough to everyone.


Quote
These two recommendations provide an extra speed, and only if you need more speed , the compilation is justified, because takes more RAM and have compatibility problems. For example, in mini-invaders, the sound command doesnt work properly in the compiled version


Yes unfortunately the SOUND command in Locomotive BASIC (both versions) is actually in a different order from anywhere else. I don't know the reason why, so if you're using it in Assembly or another Compiled Language (CPC BASIC 3/Fabacom possibly or Hisoft Pascal), it looks like this:



Code: [Select]
Channel Status Byte,
Volume Envelope,
Tone Envelope,
Tone Period (1),
Tone Period (2),
Noise Period,
Volume,
Duration of Sound (1),
Duration of Sound (2)


So that would throw anyone off if you're used to the BASIC SOUND command, which looks like this:


Code: [Select]
channel status,
tone period,
duration,
volume,
volume envelope,
tone envelope,
noise period
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Liked: 409
  • Likes Given: 72
Re: 8BP
« Reply #23 on: 01:31, 04 January 17 »
At a guess, BASIC is ordering them in a logical order with optional parts following in a mostly descending order of priority. The firmware, however, is probably leaking an internal ordering which is based around the order the CPU needs information in order to execute the command. Third party languages, like Pascal, are then exposing that ordering directly to ease the process of mapping parameters onto the firmware call.

Offline sigh

  • 6128 Plus
  • ******
  • Posts: 1.126
  • Liked: 431
  • Likes Given: 41
Re: 8BP
« Reply #24 on: 20:30, 07 January 17 »
I am so impressed by this program.

The ink rotation in your brick example - I'm really interested to see what that would look like if it was compiled, as the differences in speed in your last demonstration was insane! :D . That 50 % increase made an incredible visual difference.