Log In  
Follow
sugarflower

Thanks to HTML export, it's now possible to run picotron cartridges on a mobile phone.
However, at present the DPAD isn't displayed, and touch operations are replaced by mouse movements, making operation very uncomfortable.

So I wrote the following code to simulate touch operations.
This also led me to notice some strange behavior, but that's another story.

I'd be happy if the picotron itself could support touch operations in the future.

function _init()
	window{cursor=0} -- Hide the mouse cursor
	tch = touch.new() -- Initializing the touch structure
end

function _draw()
	-- Touch Structure Update. This is necessary to determine touch.
	tch:check() 

	--[[
	*** Wait until it truly becomes the initial state ***

	Since _init cannot fully initialize, it waits for time to pass in the main program.
	It seems that the time t() stops in _init, and the mouse position does not change. 
	It seems that time progresses entirely within _draw(_update).

	This is to prevent unnecessary tap events from occurring because a touch is 
	determined by moving the position of the mouse cursor, and the initial position of 
	the mouse cannot be obtained correctly.

	There may be a way to avoid this using memory manipulation, etc. 
	This decision statement is clearly a waste of processing.
	--]]
	if t() < 0.2 then return end

	-- Processes when it is determined that a touch has occurred.
	if tch.tap then
		splatter(tch.x, tch.y)
	end
end

--

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=156240#p)
1
0 comments



Cart #misakitest-1 | 2024-09-21 | Embed ▽ | License: CC4-BY-NC-SA
2

I've put together a way to use the MISAKI font (https://littlelimit.net/misaki.htm) to display Japanese on picotoron.

Currently, only simple functions have been implemented, so there is still a lot to do before it can be used in practical use.

I can't keep up with the work by myself, so I decided to release it here so that it can be used partially. Basically, I think it's fine if you use it freely. (I would appreciate feedback as well.)

*You will need to know the kuten code to display it, but there is a lot of useful information on the Internet about this.

2
0 comments



A virtual computer that runs on a fantasy console. I find this very interesting, so I've made it work for now.

Cart #chipeight-1 | 2024-09-10 | Embed ▽ | License: CC4-BY-NC-SA
4

Key assignments

[1][2][3][4]
[q][w][e][r]
[a][s][d][f]
[z][x][c][v]

These can also be changed in key.lua if necessary.

0.0.1b

  • Minor bug fixes
  • Modified to load ROMs as external pod files by drag and drop (Thank you pancelor!)
  • Change display from full screen to windowed (to drop the ROM)

How to create a "rom" pod.

store(filepath, userdata("u8", bytelength, romdata))

Specifically, it looks like this.

store("/logo.pod", userdata("u8", 132, "00e0a22a600c6108d01f7009a239d01fa2487008d01f7004a257d01f7008a266d01f7008a275d01f1228ff00ff003c003c003c003c00ff00ffff00ff0038003f003f003800ff00ff8000e000e00080008000e000e00080f800fc003e003f003b003900f800f8030007000f00bf00fb00f300e30043e505e2008507810180028007e106e7"))

4
6 comments



Cart #f32b_test-0 | 2024-08-22 | Embed ▽ | License: CC4-BY-NC-SA

  • Operation cannot be confirmed online.

If you want to store floating point values ​​in user data (or POD storage), currently using floats in user data or memmaps will not give good results.

My guess is that using floats in user data will be treated as standard in the future.

This program, f32b.lua, is included, and main.lua contains a simple usage example.
It is very experimental, but may be useful in some way.
It may also be possible to improve it and achieve more.
I don't think f32b.lua is fully optimized, but someone could perfect it.

The usage is as follows (contents of main.lua):

include "f32b.lua"

--[[
*** If you store it in user data.

f32b.lua uses "u8" for user data. Each floating point value uses 4 bytes.
In other words, if you want to save two values, create it as userdata("u8", 8).
--]]
mydata = userdata("u8", 8)

-- To set a value for user data, do this:
set_value(mydata, 0, -123.45)
set_value(mydata, 1, 100.0)

-- To extract it from the user data:
print(get_value(mydata, 0))
print(get_value(mydata, 1))

--

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=153082#p)
0 comments



function sel_layer(name)
	local m = fetch("map/0.map")
	local map_no = 0
	for i in pairs(m) do
		if m[i].name == name then
			map_no = i
			break
		end
	end
	if map_no != 0 then
		memmap(m[map_no].bmp, 0x100000)
	else
		error("There is no map data named '" .. name .. "'")
	end
end

I have saved the aforementioned code as a file named 'layer.lua'.
By utilizing this code, we can load specific map layers based on their assigned names.

To illustrate, imagine a map with a layer configuration as depicted in the following image.

include "layer.lua"

function _draw()
	sel_layer("sky")
	map(0, 0)

	sel_layer("house")
	map(0, 0)

	sel_layer("tree")
	map(0, 0)
end
1
0 comments



Cart #zamuwawaje-0 | 2024-08-06 | Embed ▽ | License: CC4-BY-NC-SA
1

It doesn't seem to work on the web. (This is a problem, so I'll fix it eventually. I think the cause is in the process of loading theme.pod.)

1
0 comments



Cart #trackercmd-2 | 2024-08-22 | Embed ▽ | License: CC4-BY-NC-SA

Since I have a hard time remembering tracker commands, I made this.
We can change where things show up by tweaking main.lua.

It seems that the web player can't play the tool tray.

changes

  • Fixed a typo.
  • Right-click to exit.
0 comments



Cart #zamarazida-0 | 2024-06-27 | Code ▽ | Embed ▽ | No License
1


This is Bytebeat that uses PCM function.

1
0 comments



Cart #punkt-1 | 2024-06-26 | Embed ▽ | License: CC4-BY-NC-SA
8

I ported my favorite game for Gamebuino.
It's simple but very nice.

The original punkt is here.

Note: This game is not a complete port of the original punkt.

8
0 comments



Although it is still a prototype, I have created a toy that dynamically generates sounds using PCM functions :) I am thinking about how to make this even more interesting.

Cart #zazaharudo-0 | 2024-06-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

8
1 comment



This was created to create an instruction list.
It will be useful to use spreadsheet software (such as Excel) to understand the whole.

It is intended to be used on a console.
Also, the execution results are copied to the clipboard.

1
0 comments



Cart #characterlist_2-1 | 2024-05-25 | Embed ▽ | No License
3

In the future I'm thinking of running this in a tool tray.
This is not easy to use in terms of area unless you consider the layout.

0.0.2: Simple fix to reduce unnecessary code.
0.0.3: Selected characters are now copied to the clipboard for reuse.

3
0 comments



Cart #milkiecolour-3 | 2024-05-30 | Embed ▽ | License: CC4-BY-NC-SA
4

I tried to make it :D

0.1.1 Fixed to prevent unnecessary drawing.

4
0 comments